The magic property "ant.project.invoked-targets" is set when the targets are
executed.
That means, that you can't use this property in the implicit target
<project>
<echo>${ant.project.invoked-targets}</echo>
<target name="one"/>
<target name="two"/>
</project>
You could use that only inside a target
<project default="one">
<target name="one">
<echo>Invoked Targets: ${ant.project.invoked-targets}</echo>
</target>
<target name="two">
<echo>Invoked Targets: ${ant.project.invoked-targets}</echo>
</target>
</project>
The manual (properties.html) sais:
"a comma separated list of the targets that have been specified on the
command line (the IDE, an <ant> task ...) when invoking the __current
project__."
IMO this is not true - or even concrete enough.
Should we just change the manual or move the place where this property is
set?
org.apache.tools.ant.Project.executeTargets(Vector<String>)
But not sure where instead ...
Jan