Ant: How do I know which target was invoked from the command line?

I am using Ant 1.8.2. From my build.xml file, how do I know which targets were used on the command line when I called Ant?

Thanks - Dave

+4
source share
1 answer

Use the ant.project.invoked-targets property:

  <echo message="Targets: ${ant.project.invoked-targets}"/> 

This is new since ant 1.8, I think. A few more Ant built-in properties .

+6
source

All Articles