Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Perform "mvn dependency:tree" *within Eclipse*

I have a Maven project which I program within Eclipse. In Eclipse, everything works, but when building it with Maven, I get a NoSuchMethodError on a call to a third-party jar. So I suspect that Eclipse uses a different version of that jar when compiling. I can see which version of what Maven uses, but I'd like to see which version of what Eclipse uses. I don't see how to perform a "mvn dependency:tree" from within Eclipse, such that I would see the result form "Eclipse's point-of-view".

The project was created using "File/Import.../Existing Maven Project".

I am using "Eclipse IDE for Java Developers", Version: "Kepler Service Release 1"

To perform any Maven command from Eclipse, I just found this SO question

like image 312
Sebastien Diot Avatar asked Feb 22 '14 09:02

Sebastien Diot


Video Answer


1 Answers

Make sure you installed m2e ( previously called as m2eclipse ) plugin. If Eclipse opens pom.xml as plain text, then click the pom.xml and click mouse-right button for pop-up menu. You'll see "Open With" -> " Maven POM Editor". Within Maven Pom Editor, you can check those dependencies in either "dependencies" or "dependencies hierarchy".

like image 95
wonhee Avatar answered Sep 30 '22 18:09

wonhee