Excerpt | ||
---|---|---|
| ||
wrap: protocol handler. Wraps "classic" jars as OSGi bundles. |
Pax URL Wrap is an OSGi URL handler that can process your legacy jar at runtime and transform it into an OSGi bundle.
...
Syntax ( see #examples )
Code Block |
---|
wrap-uri := "wrap:" wrapped-jar-uri [ "," wrapping-instr-uri ] [ "$" wrapping-instructions ]
wrapped-jar-uri := < rfc2396 uri > ; uri of the jar file to be wrapped
wrapping-instr-uri := < rfc2396 uri > ; uri of a java properties file that contains wrapping instructions
wrapping-instr-list := wrapping-instr / wrapping-instr "&" wrapping-instr-list
wrapping-instr := instr-name "=" instr-value
instr-name := < bnd instruction name > ;see bnd tool for details
instr-value := < bnd instruction value > ;see bnd tool for details
|
...
Wraps apache commons logging version 1.1 found on working directory using #default instructions:
Code Block |
---|
wrap:file:commons-logging-1.1.jar
|
Wraps apache commons logging version 1.1 found by using mvn: protocol using #default instructions:
Code Block |
---|
wrap:mvn:commons-logging/commons-logging/1.1
|
Wraps apache commons logging version 1.1 found by using mvn: protocol using #default instructions:
Code Block |
---|
wrap:http://repo1.maven.org/maven2/commons-logging/commons-logging/1.1/commons-logging-1.1.jar
|
Wraps apache commons logging version 1.1 found by using mvn: protocol using instructions from commons-logging-1.1.bnd from local directory:
Code Block |
---|
wrap:mvn:commons-logging/commons-logging/1.1,file:commons-logging-1.1.bnd
|
Wraps apache commons logging version 1.1 found by using mvn: protocol using instructions Bundle-SymbolicName=JCL and Bundle-Version=1.1:
Code Block |
---|
wrap:mvn:commons-logging/commons-logging/1.1$Bundle-SymbolicName=JCL&Bundle-Version=1.1
|
Wraps apache commons logging version 1.1 found by using mvn: protocol using instructions from commons-logging-1.1.bnd from local directory and instructions Bundle-SymbolicName=JCL and Bundle-Version=1.1:
Code Block |
---|
wrap:mvn:commons-logging/commons-logging/1.1,file:commons-logging-1.1.bnd$Bundle-SymbolicName=JCL&Bundle-Version=1.1 |
Wraps infinispan version 5.2.6.final found by using mvn: protocol using instructions the existing manifest and merging those with some fixed informations about Import-Package and Export-Package:
Code Block |
---|
wrap:mvn:org.infinispan/infinispan-core/5.2.6.Final$overwrite=merge&Import-Package=sun.misc;net.jcip.annotations;resolution:=optional,org.jgroups.*;version="[3.2,4)",org.jboss.logging;version="[3.1,4)",*&Export-Package=org.infinispan.*;-noimport:=true
|
NOTE: Beware that you may need to escape the $ character which precedes the instruction list if you are using a shell. That is, precede the dollar sign with a backslash: \$
. Otherwise, your instruction may be interpreted as a variable name and consequently the shell will attempt to resolve it.