Accessing ant task name when running a task

T

teggy

Hi there,

I am trying to figure out if it is possible in an ant task to get the
name of the ant task (I want to create a directory with the name of
the task) ...

-------------8<-----------------------------------------------------------
<project name="ReleaseGenerator" default="usage" basedir=".">
<target name="usage">
<echo>
${ant.project.name}
${target.name}
</echo>
</target>
</project>
-------------8<-----------------------------------------------------------

The above target produces the following output:
ReleaseGenerator
${target.name}

Instead of getting in the output ${target.name}, i would like to have
"usage" (which is the target name) ...

Thanks the help,
Cheers,
Teggy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,983
Messages
2,570,187
Members
46,747
Latest member
jojoBizaroo

Latest Threads

Top