Vizant - Ant task to visualize buildfile

$Date: 2002/07/22 16:15:40 $ - [ English | Japanese | Project Site ]

What's Vizant?

Vizant is an Apache Ant task to create Graphviz DOT source code from an Ant buildfile. The image created from the DOT source code shows the targets dependency.


The below graph was created from Ant1.5beta1 build.xml.

More examples are available.


Please download from Project Site.

Note: There are no library dependencies in vizant task, but you will need Graphviz dot command to create images.



Attribute Description Required
antfile the input Ant buildfile Yes
outfile the output DOT file Yes
from If the target name specified, cut down all blanches that the target doesn't depends on. No
to If the target name specified, cut down all blanches that the target isn't depended from. No
nocluster do not use cluster(outer rectangle) to show external buildfile No, default is false
uniqueref do not drow edge repeatedly when the <ant> or <antcall> task called more than once against the same target. No, default is false
ignoreant ignore all <ant> tasks No, default is false
ignoreantcall ignore all <antcall> tasks No, default is false
ignoredepends ignore all depends attributes No, default is false

Parameters specified as nested element


Apply attributes only to subgraphs. Subgraph is used to represent external buildfile and targets.


<attrstmt> nested element represents attr_stmt nonterminal in the DOT language specification. This element creates an group of attributes.

Attribute Description Required
type The value must be one of the
  • graph
  • node
  • edge
  • node.default
  • edge.ant
  • edge.antcall
  • edge.depends


<attr> nested element represents a DOT attribute. You can get the complete list of attributes at the Graphviz site.

Attribute Description Required
name the DOT attribute name. Yes
value the DOT attribute value. Yes


Before using, you must define the vizant task.

<taskdef name="vizant" classname="net.sourceforge.vizant.Vizant" classpath="path/to/lib/vizant.jar"/>

The most simple usage is like this.

<vizant antfile="build.xml" outfile=""/>
<exec executable="dot" ><arg line="-Tpng -o build.png"/></exec>

You can apply various DOT attributes using nested elements.

<vizant antfile="build.xml" outfile="">
  <attrstmt type="node">
    <attr name="style" value="filled"/>
    <attr name="shape" value="egg"/>
    <attr name="color" value="grey90"/>
<exec executable="dot" ><arg line="-Tsvg -o build.svg"/></exec>

And more.