Skip to content

cafetux/module-dependency-maven-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Coverage

maven module interdependencies analyzer

Sometimes, on Legacy projects, it's difficult to known which maven module is calling which maven module.

this maven plugin generate a DOT diagram file.

You can visualize them with DOT intellij plugin.

Generated file is named module-dependency.gv

Usage

Plugin is available on maven central.

           <plugin>
                <groupId>io.github.cafetux</groupId>
                <artifactId>maven-modules-analyzer</artifactId>
                <version>2.1</version>
                <configuration/>
                <executions>
                    <execution>
                        <goals>
                            <goal>maven-analyzer</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

Configuration

You can use some configuration on plugin:

   <configuration>
     <resultDirectory>path to generate results (dot diagram and image). 'target' by default</resultDirectory>
    <excludeScopes>
        <param>test</param>
        <param>another scope of dependencies you want to exclude</param>
    </excludeScopes>
    <excludeClassifiers>
        <param>test</param>
        <param>another classifier for dependencies you want to exclude</param>
    </excludeClassifiers>
    <excludeArtifactIds>
        <param>acceptance-test</param>
        <param>another artifact id you want to exclude from schema</param>
    </excludeArtifactIds>
    <includeExternalDependencies>true if you want to generate illisible diagram with external dependencies (like spring ect). false by default</includeExternalDependencies>
</configuration>

you can use as properties by prefixing configuration keys by dependency.graph.

Complementary plugin

You can use another plugin to render .gv at png: https://github.com/cafetux/dot-diagram-renderer-maven-plugin