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.
![[image]](http://mowser.com/img?url=http%3A%2F%2Fvizant.sourceforge.net%2Fexamples%2Fant%2F1s.png)
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
subgraph
Apply attributes only to subgraphs. Subgraph is used to represent external buildfile and targets.
parent: <vizant> child: <attrstmt>
attrstmt
<attrstmt> nested element represents attr_stmt nonterminal in the DOT language specification. This element creates an group of attributes.
parent: <vizant> <subgraph> child: <attr>
Attribute Description Required
type The value must be one of the
graph node edge node.default edge.ant edge.antcall edge.depends
Yes
attr
<attr> nested element represents a DOT attribute. You can get the complete list of attributes at the Graphviz site.
parent: <attrstmt> child: none
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="build.dot"/>
<exec executable="dot" ><arg line="-Tpng build.dot -o build.png"/></exec>
You can apply various DOT attributes using nested elements.
<vizant antfile="build.xml" outfile="build.dot">
<attrstmt type="node">
<attr name="style" value="filled"/>
<attr name="shape" value="egg"/>
<attr name="color" value="grey90"/>
</attrstmt>
</vizant>
<exec executable="dot" ><arg line="-Tsvg build.dot -o build.svg"/></exec>
And more.
The later version should be more flexible and be more easy to use. Support more than one format (DOT, HTML, GraphXML, etc.) using XSLT internally. Replace <attr_stmt> with XSLT parameter. Switch the node style when the target name starts with hyphen or has no description attribute. Support <foreach> tag.
You are viewing a mobilized version of this site...
View original page here