[
https://issues.apache.org/jira/browse/FELIX-308?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Stuart McCulloch resolved FELIX-308.
------------------------------------
Resolution: Fixed
OK, I've committed this patch... but without the update to bndlib,
because the recently uploaded 0.0.189 jar on central is corrupted.
-----------------------------------------------------------------------------------
The maven-bundle-plugin now accepts the following new instruction:
<Embed-Dependency>dependencies</Embed-Dependency>
where:
dependencies ::= clause ( ',' clause ) *
clause ::= MATCH ( ';' attr '=' MATCH | ';inline=true' )
attr ::= 'groupId' | 'artifactId' | 'version' | 'scope' | 'type' |
'classifier'
MATCH ::= <globbed regular expressions>
some examples:
<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:
groupId/artifactId-version.jar
this behaviour can be modified using the following instructions:
<Embed-StripGroup>true</Embed-StripGroup>
removes the version from the file (ie. groupId/artifactId.jar)
<Embed-StripVersion>true</Embed-StripVersion>
removes the groupId subdirectory (ie. artifactId-version.jar)
<Embed-Directory>directory</Embed-Directory>
adds a subdirectory (ie. deps/groupId/artifactId-version.jar)
-----------------------------------------------------------------------------------
normally the plugin only checks direct dependencies, but this can be changed
to include the complete set of transitive dependencies with the following
option:
<Embed-Transitive>true</Embed-Transitive>
-----------------------------------------------------------------------------------
if you want a dependency inlined instead of embedded add this clause:
;inline=true
for example:
<Embed-Dependency>*;scope=compile|runtime;inline=true</Embed-Dependency>
will inline any compile or runtime dependencies
-----------------------------------------------------------------------------------
> Add support for embedding dependency JAR files to bundle plugin
> ---------------------------------------------------------------
>
> Key: FELIX-308
> URL: https://issues.apache.org/jira/browse/FELIX-308
> Project: Felix
> Issue Type: New Feature
> Components: Maven Bundle Plugin
> Reporter: Richard S. Hall
> Assignee: Stuart McCulloch
> Attachments: FELIX_308_EMBED_SUPPORT_20070803.txt,
> FELIX_308_EMBED_SUPPORT_20070806.txt, FELIX_308_EMBED_SUPPORT_20070822.txt
>
>
> The following is a proposal for how to support embedding dependency JAR files
> in the bundle plugin. The general approach is a slightly modified version of
> a proposal by Peter Kriens. The idea is to add a mechanism to deal with
> embedding JARs that is very similar to how the old maven plugin worked, but
> doing it in a slightly more generic way than the old plugin by adding the
> following instruction:
> embed-dependency ::= clause ( ',' clause ) *
> clause ::= MATCH ( ';' attr '=' MATCH )
> attr ::= 'groupId' | 'artifactId' | 'version' | 'scope'
> MATCH ::= <globbed regular expressions>
> This instruction would be used to match the specified Maven dependencies for
> embedding. Any matching dependency would have its JAR file embedded onto the
> resulting bundle JAR file and it would be appended to the Bundle-ClassPath
> header after ".".
> This would allow people to easily achieve the same behavior as the old plugin
> by simply doing:
> <embed-dependency>*;scope=compile|runtime</embed-dependency>
> Thus, this instruction would automatically embed any maven dependencies that
> were of scope "compile" or "runtime" and append them to the bundle class path.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.