Maven dependency graph
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.
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.
there exists exactly what you need, it is called Pom Explorer.
You can find the website here : github.com/ltearno/pom-explorer
It is a tool to work on a graph of maven projects. As a teaser i can say that on my machine it analyzes 4000 pom.xml files in 4 seconds. Then many functionnalities are provided above the analysed pom graph :
- dependency analysis (who depends on GAV, which gavs this GAV depends on, with transitivity),
- resolution (pom explorer knows where are defined properties, it manages dependencies and bom imports),
- manipulation (you can use it to transform you pom graph, let's say if you want many projects to use a new version of a dependency),
- build (pom explorer analyses your pom graph and knows in which order they should be built, then it builds everything ! it can even watch your projects directories for change),
- exporting (today there is CSV and a GRAPHML exports),
- visualization (pom explorer can show you an interactive 3D customizable visualization of your projects graph).
It is in active development right now so don't hesitate to try it, report bugs and ask for useful features ! The documentation is also not complete yet, so again don't hesitate to ask !
mvn com.github.ferstl:depgraph-maven-plugin:aggregate -Dincludes=com.yourcompany.pkg
Does well for me.