= UMLGraph =
http://www.umlgraph.org/index.html
https://github.com/dspinellis/UMLGraph
== Installation on CentOS ==
{{{#!highlight sh
cd ~
mkdir tmp
cd tmp
git clone https://github.com/dspinellis/UMLGraph.git
cd UMLGraph/
mvn clean compile package
cp target/umlgraph-5.7.3-SNAPSHOT.jar /usr/local/lib/UmlGraph.jar
cp umlgraph /usr/local/bin/
chmod 755 umlgraph /usr/local/bin/umlgraph
vi /usr/local/bin/umlgraph
}}}
{{{#!highlight bash
#!/bin/sh
#
# Unix shell script to run UMLGraph on the specified base file name
# For this to work you must adjust the following defintion of
# UMLGRAPH_HOME to point to the directory where UmlGraph.jar is installed.
#
#
UMLGRAPH_HOME=/usr/local/lib
JAVA_HOME=/usr/java/default
echo "Current UMLGraph Home $UMLGRAPH_HOME"
echo "Current Java Home $JAVA_HOME"
if [ x$2 = x ]
then
echo usage: umlgraph base_file_name filetype [umlgraph arguments] 1>&2
echo example: umlgraph MyClass png 1>&2
echo '(The above will convert MyClass.java into MyClass.png)' 1>&2
exit 1
else
BASE=$1
FILETYPE=$2
shift 2
java -classpath "$UMLGRAPH_HOME/UmlGraph.jar:$JAVA_HOME/lib/tools.jar" \
org.umlgraph.doclet.UmlGraph -package $* -output - $BASE.java |
dot -T$FILETYPE -o$BASE.$FILETYPE
fi
}}}
Generate DOT file (GraphViz) for class Options.java
* cd ~/tmp/UMLGraph/src/main/java/org/umlgraph/doclet
* umlgraph Options dot