felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alan D. Cabrera" <l...@toolazydogs.com>
Subject Re: maven-bundle-plugin proposal
Date Fri, 26 Jan 2007 05:21:31 GMT

On Jan 25, 2007, at 12:35 PM, Richard S. Hall wrote:

> Hello,
> Back in early December we had a discussion with Emil Eifrém, Aaron  
> Siri, et al about how the new bundle plugin should deal with  
> embedding (as opposed to inlining) dependent JAR files. Peter and I  
> have finally had some time to discuss this and have come up with a  
> simple proposal that we can now submit for some feedback.
> The general approach is a slightly modified version of Peter's  
> first proposal. 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,*;scope=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.
> What do you think?

I like that finer degree of control that this gives but think that we  
should stick to using XML elements.  I think that it's bad form to  
mix-in OSGi manifest like patterns in a Maven POM, especially when  
those patterns govern the behavior of a Maven plugin.


View raw message