Table of Contents
UML Diagram Tools
This is really cool: http://www.umldesigner.org/ref-doc/define-the-system.html#Dashboard
Eclipse plugin. Goto marketplace and look for uml designer.
- Create new uml project
- Select model
- Finish, then a model.uml file and a dashboard is shown.
Generate Diagram From Code
UmlGraph
UmlGraph and Maven Javadoc
- Install Graphviz. After installation confirm that it is part of your PATH.
- Configure your maven pom files to make sure that you can get to the following repository: http://mirrors.ibiblio.org/pub/mirrors/maven2 because it has the second piece of the puzzle, the binaries for UMLGraph. You can see all the options for use in <additionalparam/> here.
- To generate UML diagrams as part of the “mvn javadoc:javadoc” command, add the following (+/-) to your pom.xml file's <build/> section.
<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-javadoc-plugin</artifactId> <configuration> <doclet>org.umlgraph.doclet.UmlGraphDoc</doclet> <docletArtifact> <groupId>org.umlgraph</groupId> <artifactId>doclet</artifactId> <version>5.1</version> </docletArtifact> <additionalparam>-views</additionalparam> <destDir>target/uml</destDir> <show>private</show> </configuration> </plugin> </plugins> </reporting>
- To generate UML diagrams as part of the “mvn site” command, add the following (+/-) to your pom.xml file's <reporting/> section.
<reporting> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-javadoc-plugin</artifactId> <version>2.8.1</version> <reportSets> <reportSet> <id>uml</id> <configuration> <doclet>org.umlgraph.doclet.UmlGraphDoc</doclet> <docletArtifact> <groupId>org.umlgraph</groupId> <artifactId>umlgraph</artifactId> <version>5.6.6</version> </docletArtifact> <additionalparam>-views -constructors</additionalparam> <useStandardDocletOptions>false</useStandardDocletOptions> <destDir>target/uml</destDir> <show>private</show> </configuration> <reports> <report>javadoc</report> </reports> </reportSet> </reportSets> </plugin> </plugins> </reporting>
- Run mvn site
- That's it, you should now be reaping the benefits as your javadocs will have UML diagrams inside each class's landing page. I used the following post to put all this info together: http://wiki.wsmoak.net/cgi-bin/wiki.pl?UMLGraph