DUE TO SPAM, SIGN-UP IS DISABLED. Goto Selfserve wiki signup and request an account.
...
The following features are only available from version 1.4.0 onwards
bundle:
...
ant
The install-file goal updates the local OBR with the details of a bundle from the local filesystem.
configuration:
...
ant goal creates a customized build.xml Ant script along with a collection of BND instructions and properties, taken from the current project and stored in maven-build.bnd. You also need to run ant:ant to create the standard Ant support tasks to download Maven dependencies and perform compilation, etc.
The customized Ant script uses the BND tool to rebuild the bundle, so any source changes should be reflected in the (re)generated manifest.
...
Example:
| No Format |
|---|
mvn org.apache.felix:maven-bundle-plugin:1.4.0:install-file \ -DpomFile=myPom.xml -Dfile=foo-1.0.jarant:ant bundle:ant ant clean package |
bundle:
...
install-file
The deploy install-file goal updates the remote local OBR with the details of the deployed a bundle from the local Maven repository. The remote OBR is found by querying the <distributionManagement> section of the project, unless -DaltDeploymentRepository is set. See http://maven.apache.org/plugins/maven-deploy-plugin/deploy-mojo.html for more details about these particular settings.
(If the project has an obr.xml file somewhere in its resources, then it will be automatically detected and applied.)
configuration:
- remoteOBR name of remote OBR, defaults to NONE (which means no remote OBR deployment)
- obrRepository used when the remoteOBR name is blank, defaults to
repository.xml - altDeploymentRepository alternative remote repository, id::layout::url
- ignoreLock ignore remote locking when updating the OBR
This goal is part of the "bundle" packaging lifecycle, but is disabled by default - to enable just set the remoteOBR parameter.
bundle:deploy-file
filesystem.
configuration:
- obrRepository path to local OBR, defaults to <local-maven-repository>
/repository.xml - groupId Maven groupId for the bundle, taken from pomFile if given
- artifactId Maven artifactId for the bundle, taken from pomFile if given
- version Maven version for the bundle, taken from pomFile if given
- packaging Maven packaging type for the bundle, taken from pomFile if given
- classifier Maven classifier type, defaults to none
- pomFile optional Pom file describing the bundle
- file bundle file, defaults to the bundle from the local Maven repository
- obrXml optional additional properties for the bundle
Example:
| No Format |
|---|
mvn org.apache.felix:maven-bundle-plugin:1.4.0:install-file \
-DpomFile=myPom.xml -Dfile=foo-1.0.jar
|
bundle:deploy
The deploy The deploy-file goal updates the remote OBR with the details of a the deployed bundle from the local filesystemMaven repository. The remote OBR is found using the -DrepositoryId and -Durl parametersby querying the <distributionManagement> section of the project, unless -DaltDeploymentRepository is set. See http://maven.apache.org/plugins/maven-deploy-plugin/deploy-file-mojo.html for more details about these particular settings.You can use the -DbundleUrl parameter to give the public location of the deployed bundle, which may differ from the remote OBR location.
(If the project has an obr.xml file somewhere in its resources, then it will be automatically detected and applied.)
configuration:
- remoteOBR name of remote OBR, defaults to an empty stringNONE (which means no remote OBR deployment)
- obrRepository used when the remoteOBR name is blank, defaults to
repository.xml - repositoryId optional altDeploymentRepository alternative remote repository id, used to lookup authentication settings
- url remote repository transport URL, like
No Format scpexe://host/path/to/obr - bundleUrl public URL of deployed bundle, like
No Format http://www.foo.org/bundles/foo.jar - groupId Maven groupId for the bundle, taken from pomFile if given
- artifactId Maven artifactId for the bundle, taken from pomFile if given
- version Maven version for the bundle, taken from pomFile if given
- packaging Maven packaging type for the bundle, taken from pomFile if given
- classifier Maven classifier type, defaults to none
- pomFile optional Pom file describing the bundle
- file bundle file, defaults to the bundle from the local Maven repository
- obrXml optional additional properties for the bundle
- ignoreLock ignore remote locking when updating the OBR
Example:
- , id::layout::url
- ignoreLock ignore remote locking when updating the OBR
This goal is part of the "bundle" packaging lifecycle, but is disabled by default - to enable just set the remoteOBR parameter.
bundle:deploy-file
The deploy-file goal updates the remote OBR with the details of a deployed bundle from the local filesystem. The remote OBR is found using the -DrepositoryId and -Durl parameters. See http://maven.apache.org/plugins/maven-deploy-plugin/deploy-file-mojo.html for more details about these particular settings.
You can use the -DbundleUrl parameter to give the public location of the deployed bundle, which may differ from the remote OBR location.
configuration:
- remoteOBR name of remote OBR, defaults to an empty string
- obrRepository used when the remoteOBR name is blank, defaults to
repository.xml - repositoryId optional repository id, used to lookup authentication settings
- url remote repository transport URL, like
No Format scpexe://host/path/to/obr - bundleUrl public URL of deployed bundle, like
No Format http://www.foo.org/bundles/foo.jar - groupId Maven groupId for the bundle, taken from pomFile if given
- artifactId Maven artifactId for the bundle, taken from pomFile if given
- version Maven version for the bundle, taken from pomFile if given
- packaging Maven packaging type for the bundle, taken from pomFile if given
- classifier Maven classifier type, defaults to none
- pomFile optional Pom file describing the bundle
- file bundle file, defaults to the bundle from the local Maven repository
- obrXml optional additional properties for the bundle
- ignoreLock ignore remote locking when updating the OBR
Example:
| No Format |
|---|
mvn org.apache.felix:maven-bundle-plugin:1.4.0:deploy-file \
-DpomFile=myPom.xml |
| No Format |
mvn org.apache.felix:maven-bundle-plugin:1.4.0:deploy-file \
-DpomFile=myPom.xml -Dfile=foo-1.0.jar -Durl=file:/tmp/example/OBR \
-DbundleUrl=http://www.foo.org/bundles/foo.jar
|
...
- obrRepository path to local OBR, defaults to <local-maven-repository>
/repository.xml
To attach this goal to your project's lifecycle, use:
- OBR, defaults to <local-maven-repository>
/repository.xml
Example:
| No Format | ||
|---|---|---|
mvn bundle:clean | ||
| Code Block | ||
| xml | xml |
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>1.4.0</version>
<executions>
<execution>
<goals>
<goal>clean</goal>
</goals>
</execution>
</executions>
</plugin>
|
Concurrent updates
With a remote OBR, several uploads may occur at the same time. However, the remote OBR is centralized in one file, so concurrent modification must be avoided. To achieve this, the plug-in implements a locking system. Each time the plug-in tries to modify the file it sets a file based lock. If it can't take the lock, it will wait and retry. After 3 attempts the upload process fails. To bypass this lock add -DignoreLock to the command-line (or add <ignoreLock>true<ignoreLock> to the configuration section of your Pom).
...