Pom Grapher

Visualize parent / child and sub-module relationship of MAVEN POMs

Overview

PomGrapher visualizes multi-module and parent-child relationships of Maven projects (POMs).
Useful if you need a quick overview of a non-trivial multi-module project.
PomGrapher does not look into artefact dependencies, use other tools like maven-reporting or m2eclipse to understand artefact dependeny.

Output

Here is an excerpt of the structure of Apache Geronimo:

Black lines denote sub-modules,
orange lines denote parent project (inheritance) relations.

Here is the full output:
apache-geronimo.pdf

Usage

1. Get PomGrapher.jar (look right)
2. Get GraphViz
3. Run it:

usage: java -jar pomgrapher....jar  -b <base directory> [-c] [-h] [-o
       <file>] [-p]
 -b,--base <base directory>   base directory of project containing root
                              pom.xml
 -c,--concentrate             concentrate graph edges
 -h,--help                    print this help
 -o <file>                    output file name
 -p,--postprocess             invoke graphviz to postprocess output

Unless you specify "-p", the output will be a GraphViz directed graph. If you are unfamilliar with GraphViz, you may want to start with

dot -Tpdf <youroutput.dot> >madlycomplicatedproject.pdf

If you specify "-p", PG will pipe it's output directly into GraphViz, saving you this step. Output will be a PDF document.

Requirements

PomGrapher requires

  • Java 1.5 or better
  • The fabolous GraphViz (available for Mac, Linux, Window): here

Restrictions

  • PomGrapher is unaware of MAVEN POM semantics, it simply parses XML documents. This can lead to unexpected results, for example if you define modules inside of a profile PG will not pick those up.
  • Error handling is almost non-existing. Current strategy is mostly "complain and continue".
  • The automatic invokation of GraphViz (via option "-p") is only supported on unix-ish operating system. On Windows you have to [invoke GraphViz manually]
  • Bugs? Nah!
    Seriously I know that it makes mistakes, so you don't want to base your lawsuit against your IT supplier on this output.
License

PomGrapher is provided under Apache License 2.0

Quick Access
No blog posts found.

Labels

project project Delete
pomgrapher pomgrapher Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.