Import an OSGi bundle as a project dependency and mark it for deployment
mvn pax:import-bundle [-DgroupId=...] -DartifactId=... [-Dversion=...]
Mojo Attributes:
| Name | Type | Description |
|---|---|---|
| artifactId | String |
The artifactId of the bundle to be imported. |
| 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. |
The artifactId of the bundle to be imported.
java.lang.StringYes${artifactId}booleanNo${deploy}truejava.lang.StringNo${exclusions}java.lang.StringNo${groupId}booleanNo${importOptional}booleanNo${importTransitive}org.apache.maven.artifact.factory.ArtifactFactoryNoorg.apache.maven.project.MavenProjectBuilderNoorg.apache.maven.artifact.resolver.ArtifactResolverNoorg.apache.maven.artifact.metadata.ArtifactMetadataSourceNobooleanNo${overwrite}truejava.lang.StringNo${provisionId}provisionjava.io.FileNo${targetDirectory}${project.basedir}booleanNo${testMetadata}truejava.lang.StringNo${version}booleanNo${widenScope}