Search code examples
javaeclipseanteclipse-plugin

Ant target dependency tree viewer


IS there a piece of software (or an eclipse plug-in) which,

given a target, would allow me to view the target dependency as a tree?

The tree does not need to be graphical, could be text based - just a tool that would help me traverse thro someone's mesh of ant files to debug them.

Does not need to be an Eclipse plug-in. However, would be nice when a node is clicked would throw the source of that target onto an editor.


Solution

  • Similar to question ant debugging in Eclipse.

    Based on Apache's ANT manual, you can start with the -projecthelp option. It might be more difficult after that because the various targets may have cross-dependencies and thus be impossible to represent the hierarchy as a tree at all.

    You could modify the build.xml to detect an environment variable, e.g. NO_PRINT which is tested in each project target and if found, only print out the project name and nothing else. The depencies for the project would remain and allow ANT to walk the tree and produce a printout of the different targets that would get touched.