pax:import-bundle

Import an OSGi bundle as a project dependency and mark it for deployment

mvn pax:import-bundle [-DgroupId=...] -DartifactId=... [-Dversion=...]

Mojo Attributes:

  • Executes as an aggregator plugin.

Required Parameters

Name Type Description
artifactId String The artifactId of the bundle to be imported.

Optional Parameters

Name Type Description
deploy boolean When false, mark the imported bundle as optional so it won't be provisioned. Default value is true.
exclusions String Comma-separated list of artifacts (use groupId:artifactId) to exclude from importing.
groupId String The groupId of the bundle to be imported.
importOptional boolean When true, also try to import optional dependencies of imported bundles.
importTransitive boolean When true, also try to import any provided dependencies of imported bundles.
m_factory ArtifactFactory Component factory for Maven artifacts
m_projectBuilder MavenProjectBuilder Component factory for Maven projects
m_resolver ArtifactResolver Component for resolving Maven artifacts
m_source ArtifactMetadataSource Component for resolving Maven metadata
overwrite boolean When true, overwrite existing entries with the new imports. Default value is true.
provisionId String Reference to the project's provision POM (use artifactId or groupId:artifactId). Default value is provision.
targetDirectory File Target directory where the bundle should be imported. Default value is ${project.basedir}.
testMetadata boolean When true, check dependency artifacts for OSGi metadata before wrapping them. Default value is true.
version String The version of the bundle to be imported.
widenScope boolean When true, also consider compile and runtime dependencies as potential bundles.

Parameter Details

artifactId

The artifactId of the bundle to be imported.

  • Type: java.lang.String
  • Required: Yes
  • Expression: ${artifactId}

deploy When false, mark the imported bundle as optional so it won't be provisioned.
  • Type: boolean
  • Required: No
  • Expression: ${deploy}
  • Default: true

exclusions Comma-separated list of artifacts (use groupId:artifactId) to exclude from importing.
  • Type: java.lang.String
  • Required: No
  • Expression: ${exclusions}

groupId The groupId of the bundle to be imported.
  • Type: java.lang.String
  • Required: No
  • Expression: ${groupId}

importOptional When true, also try to import optional dependencies of imported bundles.
  • Type: boolean
  • Required: No
  • Expression: ${importOptional}

importTransitive When true, also try to import any provided dependencies of imported bundles.
  • Type: boolean
  • Required: No
  • Expression: ${importTransitive}

m_factory Component factory for Maven artifacts
  • Type: org.apache.maven.artifact.factory.ArtifactFactory
  • Required: No

m_projectBuilder Component factory for Maven projects
  • Type: org.apache.maven.project.MavenProjectBuilder
  • Required: No

m_resolver Component for resolving Maven artifacts
  • Type: org.apache.maven.artifact.resolver.ArtifactResolver
  • Required: No

m_source Component for resolving Maven metadata
  • Type: org.apache.maven.artifact.metadata.ArtifactMetadataSource
  • Required: No

overwrite When true, overwrite existing entries with the new imports.
  • Type: boolean
  • Required: No
  • Expression: ${overwrite}
  • Default: true

provisionId Reference to the project's provision POM (use artifactId or groupId:artifactId).
  • Type: java.lang.String
  • Required: No
  • Expression: ${provisionId}
  • Default: provision

targetDirectory Target directory where the bundle should be imported.
  • Type: java.io.File
  • Required: No
  • Expression: ${targetDirectory}
  • Default: ${project.basedir}

testMetadata When true, check dependency artifacts for OSGi metadata before wrapping them.
  • Type: boolean
  • Required: No
  • Expression: ${testMetadata}
  • Default: true

version The version of the bundle to be imported.
  • Type: java.lang.String
  • Required: No
  • Expression: ${version}

widenScope When true, also consider compile and runtime dependencies as potential bundles.
  • Type: boolean
  • Required: No
  • Expression: ${widenScope}