Diane
I am interested by your code.
Thanks
Francis ANDRE
Responsable Industrialisation et Support
www.e-xmlmedia.fr
+33 1 45 36 41 33
----- Original Message -----
From: "Diane Holt" <[EMAIL PROTECTED]>
To: "Ant Users List" <[EMAIL PROTECTED]>
Sent: Saturday, July 20, 2002 5:03 AM
Subject: RE: Reading target name
> --- Dominique Devienne <[EMAIL PROTECTED]> wrote:
> > You'll need to drop js.jar and bsf.jar in ${ant.home}/lib for the
> > following to work.
> [snip script to get target name]
>
> Or you can use my exceedingly naughty task, which gets the current
> target's name and sets a property to that name. (It's naughty because you
> can use the same property over and over again :) For example:
>
> <taskdef name="gettarget" classname="GetTarget"/>
> <target name="main" depends="t1,t2">
> <gettarget property="target"/>
> <echo>target = ${target}</echo>
> </target>
>
> <target name="t1">
> <gettarget property="target"/>
> <echo>target = ${target}</echo>
> </target>
>
> <target name="t2">
> <gettarget property="target"/>
> <echo>target = ${target}</echo>
> </target>
>
> $ ant
> t1:
> [echo] target = t1
>
> t2:
> [echo] target = t2
>
> main:
> [echo] target = main
>
> Actually, I just made it even naughtier by hard-coding in "target" as a
> default name for the property if one's not specified :)
>
> If you want the source (and/or jar), just let me know.
>
> Diane
>
> =====
> ([EMAIL PROTECTED])
>
>
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Health - Feel better, live better
> http://health.yahoo.com
>
> --
> To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>