pax:wrap-jar

Create a new wrapper project inside an existing Pax-Construct OSGi project

mvn pax:wrap-jar [-DgroupId=...] -DartifactId=... [-Dversion=...] [-Dclassifier=...]
or create a standalone version which doesn't require an existing project
cd some-empty-folder
mvn org.ops4j:maven-pax-plugin:wrap-jar ...etc...

Mojo Attributes:

  • Executes as an aggregator plugin.

Required Parameters

Name Type Description
artifactId String The artifactId of the artifact to be wrapped.

Optional Parameters

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.

Parameter Details

addVersion

When true, add the wrapped artifact version to the project name.

  • Type: boolean
  • Required: No
  • Expression: ${addVersion}

archetypeVersion The archetype version to use, defaults to a version compatible with the current plugin.
  • Type: java.lang.String
  • Required: No
  • Expression: ${archetypeVersion}

artifactId The artifactId of the artifact to be wrapped.
  • Type: java.lang.String
  • Required: Yes
  • Expression: ${artifactId}

attachPom When true, create the necessary POMs to attach it to the current project.
  • Type: boolean
  • Required: No
  • Expression: ${attachPom}
  • Default: true

bundleGroupId The groupId for the bundle (generated from project details if empty).
  • Type: java.lang.String
  • Required: No
  • Expression: ${bundleGroupId}

bundleName The symbolic-name for the bundle (generated from wrapped artifact if empty).
  • Type: java.lang.String
  • Required: No
  • Expression: ${bundleName}

bundleVersion The version for the bundle (generated from wrapped artifact if empty).
  • Type: java.lang.String
  • Required: No
  • Expression: ${bundleVersion}

classifier The classifier of the artifact to be wrapped.
  • Type: java.lang.String
  • Required: No
  • Expression: ${classifier}

compactIds When true, avoid duplicate elements when combining group and artifact ids.
  • Type: boolean
  • Required: No
  • Expression: ${compactIds}
  • Default: true

contents 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).
  • Type: java.lang.String
  • Required: No
  • Expression: ${contents}

dynamicImport The DynamicImport-Package directive, see Bnd docs.
  • Type: java.lang.String
  • Required: No
  • Expression: ${dynamicImport}

embedTransitive When true, embed any dependencies inside the wrapper bundle.
  • Type: boolean
  • Required: No
  • Expression: ${embedTransitive}

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

exportContents The -exportcontents directive for this bundle, see Bnd docs.
  • Type: java.lang.String
  • Required: No
  • Expression: ${exportContents}

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

importPackage The Import-Package directive for this bundle, see Bnd docs.
  • Type: java.lang.String
  • Required: No
  • Expression: ${importPackage}

includeResource The Include-Resource directive for this bundle, see Bnd docs.
  • Type: java.lang.String
  • Required: No
  • Expression: ${includeResource}

m_archetype Component factory for Maven archetypes.
  • Type: org.apache.maven.archetype.Archetype
  • Required: No

m_defaultLayout No Description.
  • Type: org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout
  • Required: No

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_repoFactory Component factory for Maven repositories.
  • Type: org.apache.maven.artifact.repository.ArtifactRepositoryFactory
  • 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

noUses When true, don't add "uses:=" to exports, see Bnd docs.
  • Type: boolean
  • Required: No
  • Expression: ${noUses}

overwrite When true, replace existing files with ones from the new project.
  • Type: boolean
  • Required: No
  • Expression: ${overwrite}

parentId The logical parent of the new project (use artifactId or groupId:artifactId).
  • Type: java.lang.String
  • Required: No
  • Expression: ${parentId}
  • Default: wrapper-bundle-settings

remoteRepositories Other remote repositories available for discovering dependencies and extensions.
  • Type: java.lang.String
  • Required: No
  • Expression: ${remoteRepositories}

requireBundle The RequireBundle directive for this bundle, see Bnd docs.
  • Type: java.lang.String
  • Required: No
  • Expression: ${requireBundle}

targetDirectory Target directory where the project should be created.
  • 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 artifact to be wrapped.
  • Type: java.lang.String
  • Required: No
  • Expression: ${version}

wrapOptional When true, create new wrapper projects for optional dependencies.
  • Type: boolean
  • Required: No
  • Expression: ${wrapOptional}

wrapTransitive When true, create new wrapper projects for any dependencies.
  • Type: boolean
  • Required: No
  • Expression: ${wrapTransitive}