wood burning stoves 2.0*
The moose likes Ant, Maven and Other Build Tools and the fly likes Maven dependencies added from the blue? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Maven dependencies added from the blue?" Watch "Maven dependencies added from the blue?" New topic
Author

Maven dependencies added from the blue?

Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9426
    
    2

I'm quite perplexed with one issue that I have with my Maven build. I have a pom.xml that has a dependency to a library as below:


When I build my project I ran into errors and so I decided to run the maven build using -X option. When I checked the classpath, I see the following:


I'm confused as to from where did the ones that are marked bold (casbah-commons_2.9.1, casbah-commons_2.9.1, mongo-java-driver/2.7.3, casbah-query_2.9.1) in the snippet above make it to the classpath? It is quite perplexing! If I look at the pom.xml that is referenced by the maven dependency that I added,

https://oss.sonatype.org/content/repositories/releases/org/mongodb/casbah-core_2.10/2.7.0-RC2/casbah-core_2.10-2.7.0-RC2.pom

there is no transitive dependency to the older versions (2.9.1) at all, then from where is this being pulled? Any clues?


SCJP 1.4, SCWCD 1.4 - Hints for you, Certified Scrum Master
Did a rm -R / to find out that I lost my entire Linux installation!
Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9426
    
    2

Allright, I managed to get this fixed. The reason why the unwanted jar files ended being up in the classpath was because of the fact that I had an additional maven dependency to another framework called Salat which is a Scala wrapper to work with MongoDB. This was actually causing the confusion. As soon as I removed it, I was able to get rid of the strange error that I was facing. Now it is another challenge that I have to solve and this one pretty much looks like a Scala issue. So posting it in the Scala forum.

http://www.coderanch.com/t/630461/Scala/Scala-Manifest-Type-error#2886441
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Maven dependencies added from the blue?