4

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.

4

2 回答 2

2

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.

于 2012-04-17T07:45:29.877 回答
1

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.

于 2012-04-16T11:43:10.513 回答