pax-import-bundle [-g groupId] -a artifactId [-v version] [-- mvnOpts ...]

Import an existing OSGi bundle as a provided dependency. External bundles are added to both the current Maven POM and the provisioning POM referenced by the provisionId. Local bundles are only added to the current Maven POM.

  • if no groupId is given, it is assumed to be the same as the artifactId.
  • if no version is given, the latest version in the repository is selected.

Additional Maven options

-Ddeploy=falseimport the bundle, but mark it as non-deployable
-DimportTransitivealso import any provided OSGi dependencies
-DimportOptionalalso import optional OSGi dependencies
-DwidenScopealso consider compile and runtime dependencies
-Dexclusions=groupId:artifactId,...exclude these artifacts from being imported
-DtestMetadata=falsedisable exhaustive OSGi bundle detection
-DprovisionId=groupId:artifactIdlook for a different provision POM
-DtargetDirectory=pathalternative location of the importing bundle

-DprovisionId is useful when you want to import the bundle into an existing non Pax-Construct project.

Examples

pax-import-bundle -g org.slf4j -a slf4j-simple -v 1.4.3

pax-import-bundle -g org.springframework.osgi -a spring-osgi-extender -v 1.0 -- -DwidenScope -DimportTransitive