Maven plugin to create HTML report to show dependecies in DSM view.
We use Dtangler library to generate DSM matrix.
Example of report for Checkstyle project: http://checkstyle.sourceforge.net/dsm/index.html
- Edit your pom.xml like this:
<project>
...
<reporting>
<plugins>
<plugin>
<groupId>com.github.sevntu-checkstyle</groupId>
<artifactId>dsm-maven-plugin</artifactId>
<version>2.2.0</version>
</plugin>
<!-- other reporting plugins -->
</plugins>
</reporting>
...
</project>
- Then execute following commands:
mvn clean install site
Instead of install you can use compile, package or other stage, that generates class files.
DSM site part will be placed in target/site/dsm directory
- You can run only this plugin instead of all site plugins:
mvn compile com.github.sevntu-checkstyle:dsm-maven-plugin:dsm
- Also you can use option obfuscatePackageNames, that truncates package names to more short form (com.mysite.oneproject.somemodule.package -> c.m.o.somemodule.package for example). It is switched off by default.
There are two way to use it:
a) Edit yours pom.xml and add configuration section:
<project>
...
<reporting>
<plugins>
<plugin>
<groupId>com.github.sevntu-checkstyle</groupId>
<artifactId>dsm-maven-plugin</artifactId>
<version>2.2.0version>
<configuration>
<obfuscatePackageNames>true</obfuscatePackageNames>
</configuration>
</plugin>
<!-- other reporting plugins -->
</plugins>
</reporting>
...
</project>
b) Run maven with -DobfuscatePackageNames=true (false)
mvn compile com.github.sevntu-checkstyle:dsm-maven-plugin:dsm -DobfuscatePackageNames=true
If you don't use it and have long package name they will be just cutted (com.mysite.oneproject.somemodule.package -> ..project.somemodule.package)
Enjoy :)
Related projects: Eclipse Design Structure Matrix plugin