maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jörg Schaible <joerg.schai...@gmx.de>
Subject Re: bug? strange resolution of commons-logging dependency
Date Wed, 01 Jul 2009 06:21:35 GMT
Lucas Bergman wrote at Dienstag, 30. Juni 2009 21:49:

> Dennis Lundberg wrote:
>> Lucas Bergman wrote:
>> > Running this test with Maven 2.1.0 fails:
>> >
>> >   java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
>> >   [ ... ]
>> >
>> > The POM for htmlunit 2.5 declares commons-logging 1.1.1 as a
>> > (compile-scope) dependency, so this seems wrong.  There seems to
>> > be some interaction between that POM and the dependent POMs.
>> > Indeed:
>> >
>> >   [ ... ]
>> >
>> >   2.  Adding an exclusion of commons-logging to the
>> >   hibernate-ehcache dependency causes the test to succeed.  I
>> >   tried this, because the hibernate-ehcache POM depends on
>> >   commons-logging version 99.0-does-not-exist, a rather famous
>> >   JBoss kludge[1].
>> >
>> > [ ... ]
>> >
>> > Footnotes:
>> > [1] 
>> >
[http://day-to-day-stuff.blogspot.com/2007/10/announcement-version-99-does-not-exist.html
>>
>> That is your problem. What this does is mess the dependency-tree. It
>> removes commons-logging from the dependency tree because that
>> version "99.0-..." is larger than the latest current release of
>> commons-logging.  The "99.0-..." version should *never ever* reach
>> end users. It can *only* be used by internal project.
> 
> Thanks for the input.  Are you saying that the dependency of the
> hibernate-ehcache POM on commons-logging 99.0-does-not-exist is a bug?

It's an inappropriate solution for their problem with commons-logging.

> I'm sympathetic to that view, but I just want to be sure.  To be sure,
> it seems foolish for the Hibernate developers to put something like
> this in a library's POM, since it would seem to impose their kludge
> on the programmer using the library.

At least you should report this as a bug, since it actually breaks your
build. They should get at least aware or if.

> Of course, we fixed our particular problem by adding an <exclusion>
> for commons-logging from our hibernate-ehcache dependency.

You can declare commons-logging in a dependency management section. This
version and scope will have precedence over any transitive dep.

- Jörg


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Mime
View raw message