How can I get the value of the current target ant?
Does it exist a spacial variable something called TARGET?
How can I get the value of the current target ant?
Does it exist a spacial variable something called TARGET?
I think you can't, unless you spend some time coding your own custom tasks (http://ant.apache.org/manual/tutorial-writing-tasks.html)
The built-in properties you can display are: basedir, ant.file, ant.version, ant.project.name, ant.java.version
If you run ant using the -projecthelp
arg:
ant -projecthelp
you will get a listing of the main targets specified in the build.xml (or other build file as declared on the commandline).
IIRC there was a lot of discussion about this a while back (like maybe 18 months) about this. I can't remember what, if anything, was decided about it. The website has links to the mailing list archives.