Thursday, January 21, 2010

Visual representation of Ant target dependencies using tool Grand

Is your ant build file is more than 500 lines? Is your ant build file contains hundred's of targets? Then there is no doubt that you will definitely get lost in the process of understanding it. Fortunately there are tools which graphically represents Ant target dependencies. One such tool I recently used is Grand.

You can download Grand from http://www.ggtools.net/grand/. For windows, download grand-ui.zip file and extract it.
Then double click on grand-ui.bat, which opens up an editor. From the editor, open your ANT build file through File menu (File -> Quick open). Then it generates graph of all the target dependencies. It also identifies default target in different color (yellow). If a target (represented in oval )is clicked, it displays the code for that target in bottom frame.
Another good thing is that it also traverse targets present in the build files which are imported by parent build file.

This tool emphatically helps to understand complex Ant build files

No comments: