You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Jim M. Birchfield" <jb...@proteus-technologies.com> on 2006/08/23 20:22:49 UTC

Patch for the Maven OSGI Plugin

The current version (0.8.0-SNAPSHOT) places the entire jar dependency in
the generated bundle jar file.  I could not figure out how to get around
this, so I patched the OsgiJarMojo.java file to allow the POM to specify
to follow the deps, or only include the ones defined locally.

Attached is the patch if anyone is interested.

Birch

Re: Patch for the Maven OSGI Plugin

Posted by "Richard S. Hall" <he...@ungoverned.org>.
With the maven osgi plugin, you can tell it to not include a dependency 
JAR file (which will result in the classes being imported). See the docs:

    http://cwiki.apache.org/FELIX/osgi-plugin-for-maven-2.html

-> richard

Jim M. Birchfield wrote:
> The current version (0.8.0-SNAPSHOT) places the entire jar dependency in
> the generated bundle jar file.  I could not figure out how to get around
> this, so I patched the OsgiJarMojo.java file to allow the POM to specify
> to follow the deps, or only include the ones defined locally.
>
> Attached is the patch if anyone is interested.
>
> Birch
>   

Re: Patch for the Maven OSGI Plugin

Posted by Niclas Hedhman <ni...@hedhman.org>.
On Thursday 24 August 2006 02:22, Jim M. Birchfield wrote:
> The current version (0.8.0-SNAPSHOT) places the entire jar dependency in
> the generated bundle jar file.  I could not figure out how to get around
> this,

Maven allows an <exclude> directive in <dependency> where you can list 
transitive dependencies which are not to be included.


Cheers
Niclas

RE: Patch for the Maven OSGI Plugin

Posted by LECAN Damien <Da...@B2i.fr>.
> The current version (0.8.0-SNAPSHOT) places the entire jar 
> dependency in
> the generated bundle jar file. 
What do you mean by "the entire jar dependency" ?

For me, the maven-osgi-plugin add dependencies with 'compile' scope in the generated bundle. 'test', 'provided' and 'runtime' scopes prevents the plugin from putting theses kind of dependencies in the bundle.


Damien