I'm working on a unit test in code that I haven't looked at before. I noticed 
that I was getting a NoSuchMethodError with a SLF call. This apparently is due 
to different versions of the SLF pieces in the dependency tree. I see both 
1.6.1 and 1.5.2 in various places. I traced it back to one peer pom that was 
either referencing version 1.5.2 or none (the 1.5.2 reference was in a plugin 
dependency, and the "none" was in the main dependency list).

I changed both references to 1.6.1. I ran "mvn install" for that module. I 
looked at the generated POM in my ~/.m2/repository tree, and it showed both as 
1.6.1.

I then ran a "mvn dependency:tree", which the following excerpt is from:

[INFO] +- 
com.att.ecom.cq.bundle:com.att.ecom.cq.jira-connector:jar:1.5.2-SNAPSHOT:compile
[INFO] |  +- org.apache.axis:axis:jar:1.4:compile
[INFO] |  +- org.apache.axis:axis-jaxrpc:jar:1.4:compile
[INFO] |  +- org.apache.axis:axis-saaj:jar:1.4:compile
[INFO] |  +- commons-discovery:commons-discovery:jar:0.4:compile
[INFO] |  +- wsdl4j:wsdl4j:jar:1.6.2:compile
[INFO] |  +- org.slf4j:slf4j-simple:jar:1.5.2:compile (version managed from 
1.6.1)

It's still thinking it's referencing 1.5.2, even after I changed both 
references in the "jira-connector" pom to 1.6.1, but I don't understand the 
"version managed from 1.6.1" thing.

When I run "mvn test" from the command line, the results are consistent with 
this, as SLF complains that it found multiple bindings, one of which is the 
1.5.2 version.

I could obviously add an exclusion for the 1.5.2 version, but I don't 
understand why it still thinks it's referencing the 1.5.2 version.

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

Reply via email to