This small tool is intended to plot a graph to show the dependencies between Maven modules. It ignores external dependencies and shows only inter-module relationships.
Check the releases page.
- Run
mvn dependency:tree > dep.txt
in your project. This generates the dependency tree which is used in the next step. - Run
java -jar maven-to-plantuml.jar --input dep.txt --output dep.puml
. This transforms the dependency tree output to a PlantUML diagram. - Run
plantuml dep.puml
. This will render the PlantUML diagram to a PNG file. - View the file
dep.png
.
usage: maven-to-plantuml
--console-output Instead of generating a PlantUML file, print the
dependency graph to the console
-e,--exclude <arg> Artifact names of modules to exclude. Separated by
comma.
--help Prints this help
-i,--input <arg> Input file
-o,--output <arg> Output file
The graph of the example project, run with --input dep.txt --output dep.puml --exclude example
produces
this PlantUML file and is rendered to this graph:
Run ./mvnw clean package
and check the target
folder.
Licensed under GPLv3.