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 <[EMAIL PROTECTED]> 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:[EMAIL PROTECTED]
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
>

Reply via email to