<< September 13, 2007 | Home | September 15, 2007 >>

Analyzing Module Dependencies

JFrog visualizes Maven POM dependencies

The declarative approach of Maven provides us with a lot of meta data of software modules that can lead to interesting insights when properly visualized. One attempt to do is by creating images of the dependency graph. JFrog Dependency Analyzer is an open source tool that does just that.

For very simple projects the result looks great:

The nodes represent Maven artifacts (groupId, artifactId and version), the edges represent dependencies. Next to an edge you see the scope of the dependency (usually compile or test).

For larger projects you can easily end up with an unmaintainable mess. For example have a look at this analysis of Confluence:

JFrog includes a few features to help you clean up a bit:

  • Reduce the scope to "compile" to exclude dependencies used only for unit tests.
  • Make sure "show excluded" is switched off otherwise you end up with a graph showing dependencies you already excluded in your POM.
  • Reduce the depth to which transitive dependencies should be resolved.
  • Use the "Filter by group id..." feature if you want to ignore dependencies to external libraries and only show dependencies between the modules of a larger project.

You'll find more information on the JFrog Configuration page.