Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Accessing ant task name when running a task

Reply
Thread Tools

Accessing ant task name when running a task

 
 
teggy
Guest
Posts: n/a
 
      05-29-2007
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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Maven using ANT plugin for SCP task : Embedded error: Could not create task or type of type: scp. krabhi Java 1 08-09-2006 04:19 PM
error runing ant in eclipse ant view yihucd@gmail.com Java 1 03-07-2006 08:39 PM
trouble with Hibernate and Ant (probably just Ant) john martin Java 2 04-07-2005 09:27 PM
wondering how i can launch tomcat from ant without ant hanging... Chris Bedford Java 6 12-23-2004 12:41 AM
Re: Problem in ant replace task and replaceregexp task to update xml Victor Java 0 09-01-2004 03:58 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57