Create a new wrapper project inside an existing Pax-Construct OSGi project
or create a standalone version which doesn't require an existing project
mvn pax:wrap-jar [-DgroupId=...] -DartifactId=... [-Dversion=...] [-Dclassifier=...]
cd some-empty-folder
mvn org.ops4j:maven-pax-plugin:wrap-jar ...etc...
Mojo Attributes:
| Name | Type | Description |
|---|---|---|
| artifactId | String |
The artifactId of the artifact to be wrapped. |
| Name | Type | Description |
|---|---|---|
| addVersion | boolean |
When true, add the wrapped artifact version to the project name. |
| archetypeVersion | String |
The archetype version to use, defaults to a version compatible with the current plugin. |
| attachPom | boolean |
When true, create the necessary POMs to attach it to the current project. Default value is true. |
| bundleGroupId | String |
The groupId for the bundle (generated from project details if empty). |
| bundleName | String |
The symbolic-name for the bundle (generated from wrapped artifact if empty). |
| bundleVersion | String |
The version for the bundle (generated from wrapped artifact if empty). |
| classifier | String |
The classifier of the artifact to be wrapped. |
| compactIds | boolean |
When true, avoid duplicate elements when combining group and artifact ids. Default value is true. |
| contents | String |
Comma-separated list of additional archetypes to merge with the current one (use artifactId for Pax-Construct archetypes and groupId:artifactId:version for external artifacts). |
| dynamicImport | String |
The DynamicImport-Package directive, see Bnd docs. |
| embedTransitive | boolean |
When true, embed any dependencies inside the wrapper bundle. |
| exclusions | String |
Comma-separated list of artifacts (use groupId:artifactId) to exclude from wrapping. |
| exportContents | String |
The -exportcontents directive for this bundle, see Bnd docs. |
| groupId | String |
The groupId of the artifact to be wrapped. |
| importPackage | String |
The Import-Package directive for this bundle, see Bnd docs. |
| includeResource | String |
The Include-Resource directive for this bundle, see Bnd docs. |
| m_archetype | Archetype |
Component factory for Maven archetypes. |
| m_defaultLayout | ArtifactRepositoryLayout |
No description. |
| m_factory | ArtifactFactory |
Component factory for Maven artifacts |
| m_projectBuilder | MavenProjectBuilder |
Component factory for Maven projects |
| m_repoFactory | ArtifactRepositoryFactory |
Component factory for Maven repositories. |
| m_resolver | ArtifactResolver |
Component for resolving Maven artifacts |
| m_source | ArtifactMetadataSource |
Component for resolving Maven metadata |
| noUses | boolean |
When true, don't add "uses:=" to exports, see Bnd docs. |
| overwrite | boolean |
When true, replace existing files with ones from the new project. |
| parentId | String |
The logical parent of the new project (use artifactId or groupId:artifactId). Default value is wrapper-bundle-settings. |
| remoteRepositories | String |
Other remote repositories available for discovering dependencies and extensions. |
| requireBundle | String |
The RequireBundle directive for this bundle, see Bnd docs. |
| targetDirectory | File |
Target directory where the project should be created. 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 artifact to be wrapped. |
| wrapOptional | boolean |
When true, create new wrapper projects for optional dependencies. |
| wrapTransitive | boolean |
When true, create new wrapper projects for any dependencies. |
When true, add the wrapped artifact version to the project name.
booleanNo${addVersion}java.lang.StringNo${archetypeVersion}java.lang.StringYes${artifactId}booleanNo${attachPom}truejava.lang.StringNo${bundleGroupId}java.lang.StringNo${bundleName}java.lang.StringNo${bundleVersion}java.lang.StringNo${classifier}booleanNo${compactIds}truejava.lang.StringNo${contents}java.lang.StringNo${dynamicImport}booleanNo${embedTransitive}java.lang.StringNo${exclusions}java.lang.StringNo${exportContents}java.lang.StringNo${groupId}java.lang.StringNo${importPackage}java.lang.StringNo${includeResource}org.apache.maven.archetype.ArchetypeNoorg.apache.maven.artifact.repository.layout.ArtifactRepositoryLayoutNoorg.apache.maven.artifact.factory.ArtifactFactoryNoorg.apache.maven.project.MavenProjectBuilderNoorg.apache.maven.artifact.repository.ArtifactRepositoryFactoryNoorg.apache.maven.artifact.resolver.ArtifactResolverNoorg.apache.maven.artifact.metadata.ArtifactMetadataSourceNobooleanNo${noUses}booleanNo${overwrite}java.lang.StringNo${parentId}wrapper-bundle-settingsjava.lang.StringNo${remoteRepositories}java.lang.StringNo${requireBundle}java.io.FileNo${targetDirectory}${project.basedir}booleanNo${testMetadata}truejava.lang.StringNo${version}booleanNo${wrapOptional}booleanNo${wrapTransitive}