Enumerating Ant Targets Programatically
In my previous blog post, I provided some sample code showing how to execute ant targets programatically from Java. This code showed how to execute the default ant target.
Enumerating the targets is a similarly easy process. The code below shows how to iterate through all the ant targets within an ant build file.