The maven-dependency-graph plugin generates dependency graphs of a maven project. This can be helpful in identifying unnecessary and unwanted dependencies.
The plugin generates files in graphml format that can be viewed using a tool like http://www.yworks.com/products/yed
Below is a transitive compile dependency graph of the plugin itself
All graphs generated by the plugin use the same graphml structure.
Generating a dependency graph should be as easy as
No modifications to your pom are required. The plugin does require that all dependencies of your project are in your local maven repository. So make sure your project is correctly setup before running the plugin.
You will still need a graphml editor to visualize/layout the graphs.
The plugin allows overriding the default list of generated graphs through the graph.reports setting. The following command generates a transitive test graph (not included in the default reports) as well as a package graph.
mvn com.github.janssk1:maven-dependencygraph-plugin:1.2:graph -Dgraph.reports=PACKAGE,TEST-TRANSITIVE