maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jörg Schaible <>
Subject RE: Conflicting Dependency Version Dilemna
Date Wed, 09 Aug 2006 06:56:58 GMT
Hi Craig,

Craig McClanahan wrote on Wednesday, August 09, 2006 8:46 AM:

> On 8/8/06, Craig McClanahan <> wrote:
>> Why should I have to declare it in the app, when I've declared it at
>> the parent level?  What's the point of transitive dependencies if
>> they do not work the way you want, and there's no way to force them
>> to do so? 
> I should have been more clear.  It is not that transitive
> dependencies are bad ... it's that I believe inherited dependencies
> (including version dependencies described by <dependencyManagement>
> sections 
> should *always*
> override transitive dependencies on the same artifact.

This is also my PoV, struggling with the same problems. While the current algorithm works
for simple jars, it fails badly for all modules gathering the transitive dependencies:

- webapps
- ears
- all jars with the classpath in the manifest (esp. true for EJBs)

Building an ear with two EJBs I have to add a dep for any of the EJBs as well as for the EAR.
Otherwise the manifest of the two EJBs might reference the same artifact in different versions
and the EAR will contain a third one - leaving me with a complete broken EAR (not to mension
that M2 will screw up the classspaths in the manifests for snapshot deps anyway using a multi-module
build - at least this one is fixed in 2.0.5: MEJB-18).

> Alternatively, it would be reasonable to allow an override of
> whatever the default behavior is for advanced cases ... but requiring
> me to define version overrides in leaf nodes, simply because my
> inheritance hierarchy is
> deeper than my dependence hierarchy, encourages bad build architecture
> design  behavior -- and isn't part of the point of Maven to
> eliminate that
> kind of idiocy?  :-)

I wished MNG-1577 would not have been postponed from version to version ... feel the same
about the idiocy part ...

- Jörg

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message