ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Plass <DPl...@TCICREDIT.COM>
Subject RE: Getting name of 'target'
Date Mon, 15 Dec 2003 14:06:55 GMT
Alas, I don't think I can use javascript, there's no guarantee my develoeprs
will be able to download  the appropriate jars...

Thanks
--DP


-----Original Message-----
From: Jan.Materne@rzf.fin-nrw.de [mailto:Jan.Materne@rzf.fin-nrw.de] 
Sent: Monday, December 15, 2003 4:26 AM
To: user@ant.apache.org
Subject: RE: Getting name of 'target'


<target name="build">
    <script language="javascript"> <![CDATA[
        name = self.getOwningTarget().getName();
        echo = project.createTask("echo");
        echo.setMessage("I am in " + name);
        echo.perform();
    ]]></script>
</target>

There is no buildin 'magic' property. But there is a feature request 
on BugZilla [1] where you can join/vote/contribute.


Jan


[1] http://nagoya.apache.org/bugzilla/show_bug.cgi?id=3304


> -----Original Message-----
> From: David Plass [mailto:DPlass@TCICREDIT.COM]
> Sent: Friday, December 12, 2003 9:55 PM
> To: 'user@ant.apache.org'
> Subject: Getting name of 'target'
> 
> 
> How do I find out the name of the current target that is
> being executed?
> Example:
>     <target name="build">
>         <echo> I am in ${xxxxx} </echo>
>     </target>
>  
> Thanks
> --DP
>  
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message