2009-07-21

UMLgraph and Maven

Just a quick note on how to setup UML Graph in Maven.
{plugin}
{groupId>org.apache.maven.plugins{/groupId}
{artifactId>maven-javadoc-plugin{/artifactId}
{configuration}
{excludePackageNames>com.comp.proj.internal.stuf{/excludePackageNames}
{doclet>org.umlgraph.doclet.UmlGraphDoc{/doclet}
{docletArtifact}
{groupId>org.umlgraph{/groupId}
{artifactId>doclet{/artifactId}
{version>5.1{/version}
{/docletArtifact}
{additionalparam>-attributes -enumconstants -enumerations -operations -types -visibility -inferrel -inferdep -hide java.*{/additionalparam}
{destDir>withUML{/destDir}
{show>public{/show}
{/configuration}
{/plugin}

The only trick is that all the additional parameters must be set on one line ! This doesn't appear in the documentation nor on the web. Quite the contrary, I found a lot of bad examples on the web !
This POM configuration simply works great. I noticed a new UMLGraph version 5.2. I didn't try but it should work also.

There is a tiny example in the Maven documentation about Using Alternate Doclet.
There is a dead project to create a plugin for Maven: DotUML. No updates since 2007.

1 comment:

hmf said...

In newer versions (2010 or later) of Maven and umlgraph, options do not need to be on a single line.

2023 summary

  Life is bigger than what you can imagine.  Still using Roam  http://www.roamresearch.com/  to take notes Still using Mastodon mainly, but ...