RSS Feed
Download our iPhone app
Browse DevX
Sign up for e-mail newsletters from DevX

By submitting your information, you agree that devx.com may send you DevX offers via email, phone and text message, as well as email offers about other products and services that DevX believes may be of interest to you. DevX will process your information in accordance with the Quinstreet Privacy Policy.

Tip of the Day
Home » Tip Bank » XML
Language: XML
Expertise: Advanced
Jul 19, 2004



Building the Right Environment to Support AI, Machine Learning and Deep Learning

Generate a Graph of Your Ant File Targets with Vizant

When you're dealing with huge Ant files, it can be difficult to follow targets and their dependencies. Luckily, there's a tool called Vizant that can generate a graph of your Ant file targets. You simply specify the name of your Ant file, and voila—Vizant generates the graph for you.

Here is an example of a Vizant file:

<project name="vizfile" default="main">
<taskdef name="vizant" classname="net.sourceforge.vizant.Vizant" classpath="C:/Java/vizant-
<target name="main">
<vizant antfile="./build.xml" outfile="build.dot">
<attrstmt type="graph"> <!-- make graph larger -->
<attr name="ranksep" value="1.2"/>
<attr name="nodesep" value="0.5"/>
<exec executable="dot" ><arg line="-Tjpg build.dot -o build.jpg"/></exec>
Assume your Ant build file is build.xml in the same path as this file. The above file defines a task called vizant, that is loaded from the specified class in the vizant.jar file. This file is run by executing the target main which generates the graph in build.jpg.
Puneet M. Sangal
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



Thanks for your registration, follow us on our social networks to keep up-to-date