DUE TO SPAM, SIGN-UP IS DISABLED. Goto Selfserve wiki signup and request an account.
...
The default goal bundle will be initialized by setting the <packaging> entry to "bundle".
The following features are only available in the 1.1.0-SNAPSHOT version
...
Embedding dependencies
The Maven Bundle Plugin supports embedding of selected project dependencies into inside the built bundle by using the <Embed-Dependency> instruction listing all dependencies in standard Bundle manifest header syntax:
| Code Block | ||||
|---|---|---|---|---|
| ||||
<Embed-Dependency>dependencies</Embed-Dependency> |
...
| No Format |
|---|
dependencies ::= clause ( ',' clause ) * clause ::= MATCH ( ';' attr '=' MATCH | ';inline=true' ) attr ::= 'groupId' | 'artifactId' | 'version' | 'scope' | 'type' | 'classifier' MATCH ::= <globbed regular expressions> |
The plugin uses the <Embed-Dependency> instruction to transform the project dependencies into <Include-Resource> and <Bundle-ClassPath>> clauses, which are then appended to the current set of instructions and passed onto BND.
some examples:
| Code Block | ||||
|---|---|---|---|---|
| ||||
<Embed-Dependency>*;scope=compile|runtime</Embed-Dependency> <Embed-Dependency>junit;scope=test</Embed-Dependency> <Embed-Dependency>aopalliance;scope=!test;inline=true</Embed-Dependency> |
By default matched dependencies are embedded in the bundle under as artifactId-version.jar. This behaviour can be modified using the following instructions:
...
| Code Block | ||||
|---|---|---|---|---|
| ||||
<Embed-Dependency>*;scope=compile|runtime;inline=true</Embed-Dependency> |
Embed-Dependency and Export-Package
If you embed a dependency with <Embed-Dependency>, and your <Export-Package> or <Private-Package> instructions match packages inside the embedded jar, you will see some duplication inside the bundle. This is because the <Export-Package> and <Private-Package> instructions will result in classes being inlined in the bundle, even though they also exist inside the embedded jar. If you want to export packages from an embedded dependency without such duplication then you can either inline the dependency, or use a new BND instruction called <_exportcontents>.
<_exportcontents> behaves just like Export-Package, except it doesn't change the content of the bundle, just what content should be exported.
OBR integration
The latest Maven Bundle Plugin automatically updates the local OBR repository.xml file during the install phase, using a default location of:
...