Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Maven - See dependency tree without building project

Tags:

java

maven

nexus

I want to see the dependency tree of a project without actually downloading those dependencies.

I have a project whose build fails because there is some dependency which is not present in central repo, however it is not a direct dependency and I am not aware which one of my dependencies refers to it.
Now when I run mvn dependency:tree command, it builds the project and hence fails.

One way to do it is keep a dummy jar in local repo with the same name. It will not try to download the dependency and generate the entire tree. However is there any other way to do this ?

like image 512
Kanwaljeet Singh Avatar asked Jan 15 '16 07:01

Kanwaljeet Singh


1 Answers

If you are using eclipse there is a "Maven POM Editor", which shows not only the maven XML, but also a dependency hierarchy view. A working build is not necessary for it, just a correct POM XML file.

It should get installed, when you install the eclipse m2e plugin. The update site is http://download.eclipse.org/technology/m2e/releases.

like image 124
Sebastian Baumhekel Avatar answered Oct 15 '22 22:10

Sebastian Baumhekel