You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Ga...@walgreens.com on 2008/09/11 23:51:07 UTC

Using target properties in tasks

Is it possible to use the name of the target in the tasks for that target?

Below is an example of what I would like to do.  The first target spells 
everything out, but since I have named the target the same as the 
directory I want to work on I want to make that a part of the tasks. 

        <target name="WHSWMAIN">
 
                <copy todir="${destdir}\WHSWMAIN">
                        <fileset dir="${srcdir}\WHSWMAIN\Target"/>
                </copy>
        </target>

        <target name="WHSWEGRT">
 
                <copy todir="${destdir}\${target.name}">
                        <fileset dir="${srcdir}\${target.name}\Target"/>
                </copy>
        </target>


Thanks,

Gary Krone
Senior Programmer/Analyst

AC006299
EAMUS CATULI