Reputation: 121
I need to generate a dependency graph for my java application but only for sub-modules and not the plugins.
Example in pom.xml
<modules>
<module>module1/pom1.xml</module>
<module>module2/pom2.xml/module>
</modules>
I tried depgraph with graphviz but it generates the plugins dependencies and not the sub-modules, any idea?
Thanks in advance.
Upvotes: 4
Views: 1937
Reputation: 121
Finaly i found the solution using depgraph plugin , its to a apply a filter in its configuration like this :
<plugin>
<groupId>ch.elca.el4j.maven.plugins</groupId>
<artifactId>maven-depgraph-plugin</artifactId>
<version>3.0</version>
<configuration>
<groupFilter>com.stackoverflow.*</groupFilter>
</configuration>
</plugin>
this will draw all draw all dependencies starting with "com.stackoverflow" , in my case they are submodules.
Hope it helps.
Upvotes: 2
Reputation: 835
You could give the maven graph plugin a try. It can draw a dependency graph with a transitivity depth of 1. This will not guarantee you that no additional noise, dependencies which are not sub-modules, will be drawn.
The other option is to use the graphiz maven plgin and create your own dot file.
Upvotes: 1