You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by Alin Dreghiciu <ad...@gmail.com> on 2007/03/08 14:18:12 UTC

maven-bundle-plugin, wrapping and excludeTransitive

About jar wrapping:

Most of the time (at least in the cases I had) you would like to wrap only
the content of the jar you are targeting and not also the transitive
dependencies that the targeted jar has. You can do this in at least two
ways:
1. add <exclusions> to the dependency. This is verbose for the case that the
targeted jar has extensive dependencies and irrelevant to the process of
wrapping
2. set the Export-package directive  to export only those packages that you
want. here you have to know the internals of the package and if the jar has
some resources as licences, xmls' outside the main package you have to add
them one by one.

So, here I am proposing a new configuration option: excludeTransitive that
is suppose to exclude the transitive artifacts if set to true.

An example implementation can be found at the following location:
http://maven.apache.org/plugins/maven-dependency-plugin/xref/org/apache/maven/plugin/dependency/utils/filters/TransitivityFilter.html

Alin Dreghiciu

PS. Maven does not support a property of the articat as isTransitive()

<http://maven.apache.org/plugins/maven-dependency-plugin/xref/org/apache/maven/plugin/dependency/utils/filters/TransitivityFilter.html>

Re: maven-bundle-plugin, wrapping and excludeTransitive

Posted by Felix Meschberger <Fe...@day.com>.
Hi Michael,

Transitive dependencies are a great thing and huge plus for Maven 2 over
Maven 1. On the other hand, if not judiciosly configured, transitive
dependencies may quickly evolve to a huge pile of libraries being packed
when using packing plugins like the maven-bundle-plugin (as well as the war
plugin for that matter).

In this sense, and as the OSGi bundleing should really only package the
contents of specific libraries, I think an option to the maven-bundle-plugin
to ignore transitive dependencies would probably make sense.

So you have all advantages on your side: you package only what you
explicitly declare but maven projects do not loose transitive dependencies.

Regards
Felix

On 3/9/07, Hampel, Michael <mi...@siemens.com> wrote:
>
>
> Hello Alin,
>
> I don't understand why you would have to exclude the dependencies - as far
> as I
> Understood the maven-bundle plugin is not doing anything with the maven
> dependencies.
> If the dependencies are excluded (like in the hibernate osgi pom) and I
> add the hibernate
> Osgi jar as a dependency to my project, I would loose the transitive
> capability of maven as the
> Transitive dependencies of hibernate are not added anymore, e.g.: when
> doing eclipse:eclipse.
> On the other side it makes sense to exclude the dependencies, because I
> also will have to wrap the
> Hibernate dependencies to become osgi bundles - so the jta dependencies
> will change to a jta-osgi dependency....
> Does this mean I have to forget about maven's transitive capabilites?
>
> Maybe I am thinking completely wrong here - but probably you could shed
> some light,
>
> Thanx,
>
> Michael
>
>
>
>
>
>
> -----Ursprüngliche Nachricht-----
> Von: Alin Dreghiciu [mailto:adreghiciu@gmail.com]
> Gesendet: Donnerstag, 08. März 2007 14:18
> An: felix-dev@incubator.apache.org
> Betreff: maven-bundle-plugin, wrapping and excludeTransitive
>
> About jar wrapping:
>
> Most of the time (at least in the cases I had) you would like to wrap only
> the content of the jar you are targeting and not also the transitive
> dependencies that the targeted jar has. You can do this in at least two
> ways:
> 1. add <exclusions> to the dependency. This is verbose for the case that
> the
> targeted jar has extensive dependencies and irrelevant to the process of
> wrapping
> 2. set the Export-package directive  to export only those packages that
> you
> want. here you have to know the internals of the package and if the jar
> has
> some resources as licences, xmls' outside the main package you have to add
> them one by one.
>
> So, here I am proposing a new configuration option: excludeTransitive that
> is suppose to exclude the transitive artifacts if set to true.
>
> An example implementation can be found at the following location:
>
> http://maven.apache.org/plugins/maven-dependency-plugin/xref/org/apache/maven/plugin/dependency/utils/filters/TransitivityFilter.html
>
> Alin Dreghiciu
>
> PS. Maven does not support a property of the articat as isTransitive()
>
> <
> http://maven.apache.org/plugins/maven-dependency-plugin/xref/org/apache/maven/plugin/dependency/utils/filters/TransitivityFilter.html
> >
>

Re: maven-bundle-plugin, wrapping and excludeTransitive

Posted by Stuart McCulloch <mc...@gmail.com>.
BTW, one way to exclude transitive dependencies at the moment is:

1A) specify wrapped jars as dependencies with 'runtime' scope and
      use the maven-dependency-plugin to copy them into a directory
      called 'lib' ... the dependency plugin has an excludeTransitive
      option to not copy the extra jars, but they'll still get downloaded.

or...

1B) use the maven-dependency-plugin to copy named artifacts to
      a directory called lib (no excludeTransitive is needed for this)
      This has the benefit of not downloading the extra jars, but the
      maven-eclipse-plugin won't add them to the generated classpath.

2) use the following instructions in the maven-bundle-plugin:

    <Include-Resource>lib=lib</Include-Resource>
    <Bundle-ClassPath>lib/${wrapped.artifactId}-${project.version}.jar</Bundle-ClassPath>

    where wrapped.artifactId is a property set inside the pom

This should wrap the original jarfile inside the OSGi bundle (ie. no unpacking).

Cheers, Stuart

On 09/03/07, Stuart McCulloch <mc...@gmail.com> wrote:
> Hi Michael,
>
> If the original jar has dependencies with 'compile' scope then they're added to
> the build classpath and packaged in the final bundle. This may or may not be
> what you want - some jars have dependencies that form a collective module
> and would never appear separately, so you'd like those dependencies added.
>
> Other jars have dependencies that could be shared among a lot of bundles
> (ie. jdbc) - in that case you'd make a separate bundle of the dependency and
> would not want it added to the parent jar (to avoid classpath issues & bloat).
>
> If you decide to not include a dependency inside a bundle, you should probably
> declare the import as optional using ";resolution:=optional".
>
> Cheers, Stuart
>
> On 09/03/07, Hampel, Michael <mi...@siemens.com> wrote:
> >
> > Hello Alin,
> >
> > I don't understand why you would have to exclude the dependencies - as far as I
> > Understood the maven-bundle plugin is not doing anything with the maven dependencies.
> > If the dependencies are excluded (like in the hibernate osgi pom) and I add the hibernate
> > Osgi jar as a dependency to my project, I would loose the transitive capability of maven as the
> > Transitive dependencies of hibernate are not added anymore, e.g.: when doing eclipse:eclipse.
> > On the other side it makes sense to exclude the dependencies, because I also will have to wrap the
> > Hibernate dependencies to become osgi bundles - so the jta dependencies will change to a jta-osgi dependency....
> > Does this mean I have to forget about maven's transitive capabilites?
> >
> > Maybe I am thinking completely wrong here - but probably you could shed some light,
> >
> > Thanx,
> >
> > Michael
> >
> >
> >
> >
> >
> >
> > -----Ursprüngliche Nachricht-----
> > Von: Alin Dreghiciu [mailto:adreghiciu@gmail.com]
> > Gesendet: Donnerstag, 08. März 2007 14:18
> > An: felix-dev@incubator.apache.org
> > Betreff: maven-bundle-plugin, wrapping and excludeTransitive
> >
> > About jar wrapping:
> >
> > Most of the time (at least in the cases I had) you would like to wrap only
> > the content of the jar you are targeting and not also the transitive
> > dependencies that the targeted jar has. You can do this in at least two
> > ways:
> > 1. add <exclusions> to the dependency. This is verbose for the case that the
> > targeted jar has extensive dependencies and irrelevant to the process of
> > wrapping
> > 2. set the Export-package directive  to export only those packages that you
> > want. here you have to know the internals of the package and if the jar has
> > some resources as licences, xmls' outside the main package you have to add
> > them one by one.
> >
> > So, here I am proposing a new configuration option: excludeTransitive that
> > is suppose to exclude the transitive artifacts if set to true.
> >
> > An example implementation can be found at the following location:
> > http://maven.apache.org/plugins/maven-dependency-plugin/xref/org/apache/maven/plugin/dependency/utils/filters/TransitivityFilter.html
> >
> > Alin Dreghiciu
> >
> > PS. Maven does not support a property of the articat as isTransitive()
> >
> > <http://maven.apache.org/plugins/maven-dependency-plugin/xref/org/apache/maven/plugin/dependency/utils/filters/TransitivityFilter.html>
> >
>

Re: maven-bundle-plugin, wrapping and excludeTransitive

Posted by Alin Dreghiciu <ad...@gmail.com>.
I just need one: the one I'm using as direct dependency. If you take a look
at FELIX-225 you will know what I mean.
And I want to do it automatically not to pick one by hand.

Alin Dreghiciu

On 3/15/07, Carlos Sanchez <ca...@apache.org> wrote:
>
> the manifest goal will allow you to generate a bundle from the same
> project
> the bundleall will go through all transitive dependencies and bundle
> one by one if they are not already OSGi bundles. So if they are you'll
> get just the one you want
>
> On 3/14/07, Alin Dreghiciu <ad...@gmail.com> wrote:
> > I do not find the direct relation but I do find your improvements very
> > useful especially the manifest goal.
> > Could you detail more. Seems to me, if I get it rght that the bundleall
> will
> > create a bundle for all dependencies.
> > I just wish to allow me to just wrap the direct dependency and nothing
> else
> > and to not force me to exclude all the transitive dependencies.
> > I did not had enough time to look at he improvements so sorry in advance
> if
> > I'm wrong
> >
> > Alin Dreghiciu
> >
>
>
> --
> I could give you my word as a Spaniard.
> No good. I've known too many Spaniards.
>                              -- The Princess Bride
>

Re: maven-bundle-plugin, wrapping and excludeTransitive

Posted by Carlos Sanchez <ca...@apache.org>.
the manifest goal will allow you to generate a bundle from the same project
the bundleall will go through all transitive dependencies and bundle
one by one if they are not already OSGi bundles. So if they are you'll
get just the one you want

On 3/14/07, Alin Dreghiciu <ad...@gmail.com> wrote:
> I do not find the direct relation but I do find your improvements very
> useful especially the manifest goal.
> Could you detail more. Seems to me, if I get it rght that the bundleall will
> create a bundle for all dependencies.
> I just wish to allow me to just wrap the direct dependency and nothing else
> and to not force me to exclude all the transitive dependencies.
> I did not had enough time to look at he improvements so sorry in advance if
> I'm wrong
>
> Alin Dreghiciu
>


-- 
I could give you my word as a Spaniard.
No good. I've known too many Spaniards.
                             -- The Princess Bride

Re: maven-bundle-plugin, wrapping and excludeTransitive

Posted by Alin Dreghiciu <ad...@gmail.com>.
I do not find the direct relation but I do find your improvements very
useful especially the manifest goal.
Could you detail more. Seems to me, if I get it rght that the bundleall will
create a bundle for all dependencies.
I just wish to allow me to just wrap the direct dependency and nothing else
and to not force me to exclude all the transitive dependencies.
I did not had enough time to look at he improvements so sorry in advance if
I'm wrong

Alin Dreghiciu

Re: maven-bundle-plugin, wrapping and excludeTransitive

Posted by Carlos Sanchez <ca...@apache.org>.
As part of https://issues.apache.org/jira/browse/FELIX-199 there's the
functionality to package jars one by one, and to generate only the
manifest.

I had the same problem, I just wanted exact copies of the jars but
with the osgi manifest

On 3/9/07, Hampel, Michael <mi...@siemens.com> wrote:
>
>
>
> Hello all,
>
> Thank's a lot for your answers.
> In the beginning I was even more confused by your answers but then...
> What I did not understand was the packaging issue, because when I executed for example
> The hibernate osgi pom with or without excluding hibernate's transitive dependencies -
> I always got the same resulting jar file - the dependencies never got added to the
> Jar, only 'declarative' in the MANIFEST file.
> So that's why I did not understand why to exclude the dependencies.
> But then I remembered that I changed the felix maven bundle plugin (BundlePlugin.java) as I have a problem
> With its regular expression handling with maven SNAPSHOT versions when bundling my own osgi projects.
> (I still have this problem, although I was building it from the felix trunk, version 0.9.0-incubator-SNAPSHOT).
> As you all probably know Carlos Sanchez developed a maven-bundle-plugin with some additional goals but also the
> bundle goal.
> So I replaced the felix BundlePlugin class with the one of Carlos. This fixed the version handling, but apparently
> Changed something else as well - when bundling with this plugin the transitive dependencies are not added to the resulting bundle jar.
> After remembering this, I then tried again with the 'original' felix maven bundle plugin and voila the dependencies(exploded packages) were added to the osgi jar file and then I understood the excluding issue.
> I don't know now if this was an intended feature that Carlos added - but if - it looks like you don't have to exclude
> Anymore.
> But anyway your answers helped a lot because I still have problems with changing between Maven and OSGi world and how they could work together the best way.
>
> So, thanx again,
>
> Michael
>
>
>
>
> -----Ursprüngliche Nachricht-----
> Von: Stuart McCulloch [mailto:mcculls@gmail.com]
> Gesendet: Freitag, 09. März 2007 09:17
> An: felix-dev@incubator.apache.org
> Betreff: Re: maven-bundle-plugin, wrapping and excludeTransitive
>
> Hi Michael,
>
> If the original jar has dependencies with 'compile' scope then they're added to
> the build classpath and packaged in the final bundle. This may or may not be
> what you want - some jars have dependencies that form a collective module
> and would never appear separately, so you'd like those dependencies added.
>
> Other jars have dependencies that could be shared among a lot of bundles
> (ie. jdbc) - in that case you'd make a separate bundle of the dependency and
> would not want it added to the parent jar (to avoid classpath issues & bloat).
>
> If you decide to not include a dependency inside a bundle, you should probably
> declare the import as optional using ";resolution:=optional".
>
> Cheers, Stuart
>
> On 09/03/07, Hampel, Michael <mi...@siemens.com> wrote:
> >
> > Hello Alin,
> >
> > I don't understand why you would have to exclude the dependencies - as far as I
> > Understood the maven-bundle plugin is not doing anything with the maven dependencies.
> > If the dependencies are excluded (like in the hibernate osgi pom) and I add the hibernate
> > Osgi jar as a dependency to my project, I would loose the transitive capability of maven as the
> > Transitive dependencies of hibernate are not added anymore, e.g.: when doing eclipse:eclipse.
> > On the other side it makes sense to exclude the dependencies, because I also will have to wrap the
> > Hibernate dependencies to become osgi bundles - so the jta dependencies will change to a jta-osgi dependency....
> > Does this mean I have to forget about maven's transitive capabilites?
> >
> > Maybe I am thinking completely wrong here - but probably you could shed some light,
> >
> > Thanx,
> >
> > Michael
> >
> >
> >
> >
> >
> >
> > -----Ursprüngliche Nachricht-----
> > Von: Alin Dreghiciu [mailto:adreghiciu@gmail.com]
> > Gesendet: Donnerstag, 08. März 2007 14:18
> > An: felix-dev@incubator.apache.org
> > Betreff: maven-bundle-plugin, wrapping and excludeTransitive
> >
> > About jar wrapping:
> >
> > Most of the time (at least in the cases I had) you would like to wrap only
> > the content of the jar you are targeting and not also the transitive
> > dependencies that the targeted jar has. You can do this in at least two
> > ways:
> > 1. add <exclusions> to the dependency. This is verbose for the case that the
> > targeted jar has extensive dependencies and irrelevant to the process of
> > wrapping
> > 2. set the Export-package directive  to export only those packages that you
> > want. here you have to know the internals of the package and if the jar has
> > some resources as licences, xmls' outside the main package you have to add
> > them one by one.
> >
> > So, here I am proposing a new configuration option: excludeTransitive that
> > is suppose to exclude the transitive artifacts if set to true.
> >
> > An example implementation can be found at the following location:
> > http://maven.apache.org/plugins/maven-dependency-plugin/xref/org/apache/maven/plugin/dependency/utils/filters/TransitivityFilter.html
> >
> > Alin Dreghiciu
> >
> > PS. Maven does not support a property of the articat as isTransitive()
> >
> > <http://maven.apache.org/plugins/maven-dependency-plugin/xref/org/apache/maven/plugin/dependency/utils/filters/TransitivityFilter.html>
> >
>


-- 
I could give you my word as a Spaniard.
No good. I've known too many Spaniards.
                             -- The Princess Bride

AW: maven-bundle-plugin, wrapping and excludeTransitive

Posted by "Hampel, Michael" <mi...@siemens.com>.
 


Hello all,

Thank's a lot for your answers.
In the beginning I was even more confused by your answers but then...
What I did not understand was the packaging issue, because when I executed for example
The hibernate osgi pom with or without excluding hibernate's transitive dependencies -
I always got the same resulting jar file - the dependencies never got added to the
Jar, only 'declarative' in the MANIFEST file.
So that's why I did not understand why to exclude the dependencies.
But then I remembered that I changed the felix maven bundle plugin (BundlePlugin.java) as I have a problem
With its regular expression handling with maven SNAPSHOT versions when bundling my own osgi projects.
(I still have this problem, although I was building it from the felix trunk, version 0.9.0-incubator-SNAPSHOT).
As you all probably know Carlos Sanchez developed a maven-bundle-plugin with some additional goals but also the
bundle goal. 
So I replaced the felix BundlePlugin class with the one of Carlos. This fixed the version handling, but apparently
Changed something else as well - when bundling with this plugin the transitive dependencies are not added to the resulting bundle jar.
After remembering this, I then tried again with the 'original' felix maven bundle plugin and voila the dependencies(exploded packages) were added to the osgi jar file and then I understood the excluding issue.
I don't know now if this was an intended feature that Carlos added - but if - it looks like you don't have to exclude
Anymore.
But anyway your answers helped a lot because I still have problems with changing between Maven and OSGi world and how they could work together the best way.

So, thanx again,

Michael 

 
 

-----Ursprüngliche Nachricht-----
Von: Stuart McCulloch [mailto:mcculls@gmail.com] 
Gesendet: Freitag, 09. März 2007 09:17
An: felix-dev@incubator.apache.org
Betreff: Re: maven-bundle-plugin, wrapping and excludeTransitive

Hi Michael,

If the original jar has dependencies with 'compile' scope then they're added to
the build classpath and packaged in the final bundle. This may or may not be
what you want - some jars have dependencies that form a collective module
and would never appear separately, so you'd like those dependencies added.

Other jars have dependencies that could be shared among a lot of bundles
(ie. jdbc) - in that case you'd make a separate bundle of the dependency and
would not want it added to the parent jar (to avoid classpath issues & bloat).

If you decide to not include a dependency inside a bundle, you should probably
declare the import as optional using ";resolution:=optional".

Cheers, Stuart

On 09/03/07, Hampel, Michael <mi...@siemens.com> wrote:
>
> Hello Alin,
>
> I don't understand why you would have to exclude the dependencies - as far as I
> Understood the maven-bundle plugin is not doing anything with the maven dependencies.
> If the dependencies are excluded (like in the hibernate osgi pom) and I add the hibernate
> Osgi jar as a dependency to my project, I would loose the transitive capability of maven as the
> Transitive dependencies of hibernate are not added anymore, e.g.: when doing eclipse:eclipse.
> On the other side it makes sense to exclude the dependencies, because I also will have to wrap the
> Hibernate dependencies to become osgi bundles - so the jta dependencies will change to a jta-osgi dependency....
> Does this mean I have to forget about maven's transitive capabilites?
>
> Maybe I am thinking completely wrong here - but probably you could shed some light,
>
> Thanx,
>
> Michael
>
>
>
>
>
>
> -----Ursprüngliche Nachricht-----
> Von: Alin Dreghiciu [mailto:adreghiciu@gmail.com]
> Gesendet: Donnerstag, 08. März 2007 14:18
> An: felix-dev@incubator.apache.org
> Betreff: maven-bundle-plugin, wrapping and excludeTransitive
>
> About jar wrapping:
>
> Most of the time (at least in the cases I had) you would like to wrap only
> the content of the jar you are targeting and not also the transitive
> dependencies that the targeted jar has. You can do this in at least two
> ways:
> 1. add <exclusions> to the dependency. This is verbose for the case that the
> targeted jar has extensive dependencies and irrelevant to the process of
> wrapping
> 2. set the Export-package directive  to export only those packages that you
> want. here you have to know the internals of the package and if the jar has
> some resources as licences, xmls' outside the main package you have to add
> them one by one.
>
> So, here I am proposing a new configuration option: excludeTransitive that
> is suppose to exclude the transitive artifacts if set to true.
>
> An example implementation can be found at the following location:
> http://maven.apache.org/plugins/maven-dependency-plugin/xref/org/apache/maven/plugin/dependency/utils/filters/TransitivityFilter.html
>
> Alin Dreghiciu
>
> PS. Maven does not support a property of the articat as isTransitive()
>
> <http://maven.apache.org/plugins/maven-dependency-plugin/xref/org/apache/maven/plugin/dependency/utils/filters/TransitivityFilter.html>
>

Re: maven-bundle-plugin, wrapping and excludeTransitive

Posted by Stuart McCulloch <mc...@gmail.com>.
Hi Michael,

If the original jar has dependencies with 'compile' scope then they're added to
the build classpath and packaged in the final bundle. This may or may not be
what you want - some jars have dependencies that form a collective module
and would never appear separately, so you'd like those dependencies added.

Other jars have dependencies that could be shared among a lot of bundles
(ie. jdbc) - in that case you'd make a separate bundle of the dependency and
would not want it added to the parent jar (to avoid classpath issues & bloat).

If you decide to not include a dependency inside a bundle, you should probably
declare the import as optional using ";resolution:=optional".

Cheers, Stuart

On 09/03/07, Hampel, Michael <mi...@siemens.com> wrote:
>
> Hello Alin,
>
> I don't understand why you would have to exclude the dependencies - as far as I
> Understood the maven-bundle plugin is not doing anything with the maven dependencies.
> If the dependencies are excluded (like in the hibernate osgi pom) and I add the hibernate
> Osgi jar as a dependency to my project, I would loose the transitive capability of maven as the
> Transitive dependencies of hibernate are not added anymore, e.g.: when doing eclipse:eclipse.
> On the other side it makes sense to exclude the dependencies, because I also will have to wrap the
> Hibernate dependencies to become osgi bundles - so the jta dependencies will change to a jta-osgi dependency....
> Does this mean I have to forget about maven's transitive capabilites?
>
> Maybe I am thinking completely wrong here - but probably you could shed some light,
>
> Thanx,
>
> Michael
>
>
>
>
>
>
> -----Ursprüngliche Nachricht-----
> Von: Alin Dreghiciu [mailto:adreghiciu@gmail.com]
> Gesendet: Donnerstag, 08. März 2007 14:18
> An: felix-dev@incubator.apache.org
> Betreff: maven-bundle-plugin, wrapping and excludeTransitive
>
> About jar wrapping:
>
> Most of the time (at least in the cases I had) you would like to wrap only
> the content of the jar you are targeting and not also the transitive
> dependencies that the targeted jar has. You can do this in at least two
> ways:
> 1. add <exclusions> to the dependency. This is verbose for the case that the
> targeted jar has extensive dependencies and irrelevant to the process of
> wrapping
> 2. set the Export-package directive  to export only those packages that you
> want. here you have to know the internals of the package and if the jar has
> some resources as licences, xmls' outside the main package you have to add
> them one by one.
>
> So, here I am proposing a new configuration option: excludeTransitive that
> is suppose to exclude the transitive artifacts if set to true.
>
> An example implementation can be found at the following location:
> http://maven.apache.org/plugins/maven-dependency-plugin/xref/org/apache/maven/plugin/dependency/utils/filters/TransitivityFilter.html
>
> Alin Dreghiciu
>
> PS. Maven does not support a property of the articat as isTransitive()
>
> <http://maven.apache.org/plugins/maven-dependency-plugin/xref/org/apache/maven/plugin/dependency/utils/filters/TransitivityFilter.html>
>

AW: maven-bundle-plugin, wrapping and excludeTransitive

Posted by "Hampel, Michael" <mi...@siemens.com>.
 
Hello Alin,

I don't understand why you would have to exclude the dependencies - as far as I
Understood the maven-bundle plugin is not doing anything with the maven dependencies.
If the dependencies are excluded (like in the hibernate osgi pom) and I add the hibernate
Osgi jar as a dependency to my project, I would loose the transitive capability of maven as the
Transitive dependencies of hibernate are not added anymore, e.g.: when doing eclipse:eclipse.
On the other side it makes sense to exclude the dependencies, because I also will have to wrap the
Hibernate dependencies to become osgi bundles - so the jta dependencies will change to a jta-osgi dependency....
Does this mean I have to forget about maven's transitive capabilites?

Maybe I am thinking completely wrong here - but probably you could shed some light,

Thanx,

Michael



 
 

-----Ursprüngliche Nachricht-----
Von: Alin Dreghiciu [mailto:adreghiciu@gmail.com] 
Gesendet: Donnerstag, 08. März 2007 14:18
An: felix-dev@incubator.apache.org
Betreff: maven-bundle-plugin, wrapping and excludeTransitive

About jar wrapping:

Most of the time (at least in the cases I had) you would like to wrap only
the content of the jar you are targeting and not also the transitive
dependencies that the targeted jar has. You can do this in at least two
ways:
1. add <exclusions> to the dependency. This is verbose for the case that the
targeted jar has extensive dependencies and irrelevant to the process of
wrapping
2. set the Export-package directive  to export only those packages that you
want. here you have to know the internals of the package and if the jar has
some resources as licences, xmls' outside the main package you have to add
them one by one.

So, here I am proposing a new configuration option: excludeTransitive that
is suppose to exclude the transitive artifacts if set to true.

An example implementation can be found at the following location:
http://maven.apache.org/plugins/maven-dependency-plugin/xref/org/apache/maven/plugin/dependency/utils/filters/TransitivityFilter.html

Alin Dreghiciu

PS. Maven does not support a property of the articat as isTransitive()

<http://maven.apache.org/plugins/maven-dependency-plugin/xref/org/apache/maven/plugin/dependency/utils/filters/TransitivityFilter.html>