Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Maven dependency graph

Tags:

java

maven

Is there a way to have a Maven dependency graph of a given set of projects (if possible, graphical), without having 3rd party dependencies drawn too? Or where I opt out the dependencies I'm not interested in?

I'd like to point the tool/plugin at a number of POM files and see a description of the dependencies between those projects.

like image 980
Simhor Avatar asked Jul 01 '13 20:07

Simhor


People also ask

How do you analyze a dependency tree in Maven?

Find it using maven infrastructure. Go to https://search.maven.org/ and enter your groupId and artifactId. Or you can go to https://repo1.maven.org/maven2/ and navigate first using plugins groupId, later using artifactId and finally using its version.

What is meant by dependency graph?

A dependency graph is a data structure formed by a directed graph that describes the dependency of an entity in the system on the other entities of the same system. The underlying structure of a dependency graph is a directed graph where each node points to the node on which it depends.

What is Maven dependency?

What is Maven Dependency? In Maven, a dependency is just another archive—JAR, ZIP, and so on—which our current project needs in order to compile, build, test, and/or run. These project dependencies are collectively specified in the pom. xml file, inside of a <dependencies> tag.


1 Answers

If you use mvn dependency:tree, you can specify files to exclude or include with -Dexcludes and -Dincludes. The output is an ASCII-art style depiction of the dependencies.

See the docs for more info.

like image 171
Duncan Jones Avatar answered Oct 02 '22 18:10

Duncan Jones