New Version of AntGraph

by Eric M. Burke

Related link: http://www.ericburke.com



What started out as a quick and dirty hack is, well, a little better. AntGraph uses an XSLT stylesheet to convert any Ant buildfile into a "dot" file, which is then converted into a GIF image using Graphviz from ATT labs.


This new release fixes two bugs, one of which was reported by Jeff Brown, the creator of JarSpy. Specifically, I was not quoting target names when charting antcall tasks, so Ant targets containing "." characters confused Graphviz.


While fixing the bugs, I added some unit tests so hopefully the bugs won't resurface in future releases.


I'm a little curious about JGraph and JGraphpad, which are pure-Java graphing toolkits. Although Graphviz works great, it is not written in Java which makes it slightly harder to integrate into Java tools like AntGraph. If I modified AntGraph to use JGraph, I could include a few extra JAR files in the download and it would work on any platform. As it stands now, you are responsible for downloading a platform-specific release of Graphviz before you can use AntGraph.


At any rate, my time is pretty limited these days so I'll probably leave AntGraph as-is. Hopefully people will find it to be a useful little utility.

Let me know if you are using AntGraph or would like to see some new feature.


9 Comments

vbrabant
2003-07-26 12:06:19
why not use SVG ?
Imagine that you modify AntGraph to produce directly a SVG file.


Do you think it is easily feasable ?


Vincent Brabant
http://translatedfiles.netbeans.org

burke_e
2003-07-26 17:51:30
why not use SVG ?
Antgraph produces a Graphviz DOT file. Graphviz then converts this into an image. Graphviz can also produce JPG, SVG, and tons of other formats listed here. Its just a matter of changing one of the command line args when Graphviz is invoked...change this parameter:
-Tgif

To this:
-Tsvg


I suppose the other option is for the Antgraph XSLT stylesheet to produce SVG directly, which is probably what you are getting at, however that would be a LOT more work. Producing the SVG is one thing...controlling the page layout is probably no trivial task. I'm relying on Graphviz to do that hard work.

anonymous2
2003-08-03 13:37:51
AntGraph
Looks good, another nice feature would be to see some of the detail information within each target graphed.
anonymous2
2003-08-08 21:49:03
Doumenttaion in Hindi?
My english no speak write good if you please and need job from america can you forthright send documenttaion for this helpful tool in Hindi?
anonymous2
2003-08-19 10:19:14
Ant/JDK Requirements?
My development environment is sdk 1.3.1 and ant 1.4.1


I found ant 1.4.1 couldn't accommodate the "unless" attribute of .


So I upgraded ant to 1.5.4, and now I get
>>>>>>
BUILD FAILED
javax.xml.transform.TransformerFactoryConfigurationError: Provider for javax.xml
.transform.TransformerFactory cannot be found
at javax.xml.transform.TransformerFactory.newInstance(Unknown Source)
.....


Looks like in need to upgrade to 1.4 sdk. Is that correct, or have I made a mistake elsewhere?



burke_e
2003-08-19 11:19:25
Ant/JDK Requirements?
Ant's "style" task requires an XSLT processor. You can either upgrade to Java 1.4.x, which includes Xalan, or install an XSLT processor if you want to stick with Java 1.3.x. To do this, fetch xalan.jar and copy it to your ANT_HOME/lib directory. I hope this helps.
mcroft
2004-04-08 06:51:32
very useful for me.
It handles our xml includes very nicely and helps me look at a build process I inherited.


Would it be possible to get it to follow ant and antcall tasks? We're building from the top (I know, not best practice), so I have to walk through several images to find what I want.


Hmm. I wonder if there's a way to generate html imagemaps and make those targets clickable with a listing of the tasks in the target...


anyway, it's solving problems for me right now, so thanks!


M Croft

mcroft
2004-04-08 06:51:35
very useful for me.
It handles our xml includes very nicely and helps me look at a build process I inherited.


Would it be possible to get it to follow ant and antcall tasks? We're building from the top (I know, not best practice), so I have to walk through several images to find what I want.


Hmm. I wonder if there's a way to generate html imagemaps and make those targets clickable with a listing of the tasks in the target...


anyway, it's solving problems for me right now, so thanks!


M Croft

robrambusch
2005-09-02 06:52:54
AntGraph download
I'm having trouble finding the download site for AntGraph. I already have GraphViz.


Thanks,


Rob Rambusch