Skip to content

Instantly share code, notes, and snippets.

@chabala
Created May 12, 2016 18:46
Show Gist options
  • Save chabala/c7cf6939573656bb4423b139f1832570 to your computer and use it in GitHub Desktop.
Save chabala/c7cf6939573656bb4423b139f1832570 to your computer and use it in GitHub Desktop.
Using Visant to graph Ant target dependencies
<project name="vizfile" default="main">
<taskdef name="vizant"
classname="net.sourceforge.vizant.Vizant"
classpath="${user.home}/.m2/repository/net/sourceforge/vizant/vizant/0.1.2/vizant-0.1.2.jar"/>
<target name="main">
<vizant antfile="./build.xml" outfile="build.dot">
<attrstmt type="graph">
<attr name="ranksep" value="1.2"/>
<attr name="nodesep" value="0.5"/>
</attrstmt>
</vizant>
<exec executable="dot">
<arg line="-Tjpg build.dot -o build.jpg"/>
</exec>
</target>
</project>
@chabala
Copy link
Author

chabala commented May 12, 2016

Run with ant -f vizfile.xml.

Visant isn't in Maven, so you'll need to download the jar and put it somewhere yourself. I installed it in my local Maven repo at the logical place.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment