Log in

View Full Version : sharing a visualization of the ant build.xml dependency structure


Jeanne Boyarsky
19-01-2012, 23:14
Our team was trying to write a custom target in the NetBeans build.xml. Since there were so many targets in the sunspot build.xml it calls, it was making my heads spin thinking about the interactions. So I turned it into a visual dependency graph.

Sharing in case anyone else is reading the xml:
PDF showing all the targets (http://www.selikoff.net/wp-content/uploads/2012/01/sun-spot-frc.pdf) and their dependencies. (This is a really tiny font, you need to zoom in and scroll around.)
Blog post (http://www.selikoff.net/2012/01/19/ant-dependency-graphing-with-graphviz/) on how I created this.

Ant terminology for anyone reading this who is confused:
build.xml - the name of the file containing instructions on how to build/package/deploy the java code
target - kind of like a method except in XML and it gets called differently
sunspot build.xml - comes with the plugins - has many targets and calls/includes other xml files with even more targets

Patrickwhite
19-01-2012, 23:23
Whoa - that huge column gets impossible to follow!

What is your goal in doing this? In the preseason I tried to edit the build.xml so that we could have a process for deploying code that had already been built without recompiling it. I ended up leaving the file as is because I wasn't getting anywhere and I was causing strange errors.

Is your goal somewhat similar?

Jeanne Boyarsky
20-01-2012, 16:36
The team is working on a simulator to run code without having a robot. (virsysj which is a java port). The idea is to right click the robot and either deploy to the robot or the simulator. Hence reading the Ant stuff. We didn't really need the visualization. I wanted to see it anyway.

Jeanne Boyarsky
20-01-2012, 16:38
One key is we DID NOT touch their build.xml. We only touvhed the build.xml for our robot project. Which imports the monstor file in the visualization. I heavily used zooming to read the file though.