Can I programmatically get the target name in Ant?
From: Carlo Broglia (brogliacarlo_at_hotmail.com)
Date: 09/02/04
- Previous message: nicky: "Re: Problem to setup WSDK 5.1"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 2 Sep 2004 08:36:22 -0700
hello,
I can't figure out how I can access the name of the target I am
building.
<target name="buildCommsServer" depends="init">
<antcall target="do.bldfiles.abld.runabld">
<param name="application.dir"
value="${commsserver.application.dir}"/>
<param name="result" value="commsserver.result"/>
<param name="logfile" value="${target.name}"/>
</antcall>
</target>
In this example, the antcall target ="do.bldfiles.abld.runabld" is
doing the actual compilation steps, as well as generating a log file.
I am calling the antcall target several times with different projects
to build (a subroutine, for lack of a better name) and I would like to
have the log file named the same as the target.
Obviously using "${target.name}" is the wrong syntax, but I was
wondering if there was a way to get to it. Of course I can just copy
and paste the string, or create a property, but it would be less
automated than I like.
thanks,
Carlo
- Previous message: nicky: "Re: Problem to setup WSDK 5.1"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]