Lucas Bergman wrote at Montag, 29. Juni 2009 18:11:
> Jörg Schaible wrote:
>> Lucas Bergman wrote:
>> > Jörg Schaible 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...
>> > >
>> > > By default commons-logging tries to discover the logger in use
>> > > on its own. Somehow a log4j is available from somewhere else,
>> > > but the classpath does not match. Therefore disable the
>> > > discovery by either providing a commons-logging.properties file
>> > > in src/test/resources or set a system property in the surefire
>> > > configuration for your tests.
>> >
>> > Thank you for the answer, but I don't think that that is the
>> > problem. The commons-logging library never gets as far as
>> > configuration sniffing, since Maven doesn't include it in the
>> > classpath at all. Running Maven with -X confirms that
>> > commons-logging-*.jar is never included in the classpath when
>> > running tests, unless I do one or more of the rain dances I
>> > detailed in my original message[1].
>> >
>> > The more I think about this, the more this seems like a Maven bug.
>>
>> See
http://jira.codehaus.org/browse/MNG-4207 for background.
>
> I understand what you're saying, but that's not it. Look at the error
> above: the commons-logging classes are not even loaded, let alone
> configured. Am I missing something?
You've been right, I should have read your question closer. See Dennis'
answer. Actually there was an attempt to release an official empty
commons-logging at Apache recently and it was tunred down exactly because
we could foresee this problem you're facing now :-/
- Jörg
---------------------------------------------------------------------
To unsubscribe, e-mail:
users-unsubscribe@...
For additional commands, e-mail:
users-help@...