This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Maven dependencies added from the blue?

 
Joe Harry
Ranch Hand
Posts: 10091
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Joe Harry
Ranch Hand
Posts: 10091
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic