ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lopez, William" <>
Subject RE: Valid depends value
Date Sat, 12 Apr 2003 22:06:54 GMT

Thanks for the response. I define a property
<property name="copy.envnt" value="copy${envnt}"/>

...the following targets are defined to backup different directories
depending on an arg that is passed
in via the cmd line using, "ant -Denvnt="INT" >> backup.log 2>&1"

<target name="copyALL"
<target name="copyINT"
<target name="copySYS"
<target name="copyUAT"

...the default target is defined as:
<target name="emailStop" depends="init,copyMisc,${copy.envnt}">

But it bombs on the resolution of ${copy.envnt} in the depends attribute of
target "emailStop". I have not had luck with te unless or if but if that's
the only way to go I'll give it another shot in figuring it out.

Thanks for your time!

-----Original Message-----
From: Ciramella, EJ [] 
Sent: Friday, April 11, 2003 11:43 PM
To: 'Ant Users List'
Subject: RE: Valid depends value

if you want this target to be executed according to a parameter, what I'd do
is have this target configured with an "unless" attribute.  

Then in a property file, set the default behavior (true/false).  Then have a
condition statement that sets another property if the value in the property
file is set to true or false (depending on what you want to have happen).
Then you can always call the copyINT target.  To override the value set in
the property file, just use -Dname=value on the command line.

is INT an ever increasing/decreasing/fluctuating number?  Maybe a little
more background on what you're trying to do.

-----Original Message-----
From: Lopez, William []
Sent: Friday, April 11, 2003 7:01 PM
Subject: Valid depends value


I have a target defined as <target name="emailStop"

I have a property named copy.envnt that takes the value of the arg passed in
via the cmd line. So if "INT" is passed in copy.envnt resolves to copyINT
but it blows on the ${copy.envnt} in the depends value. How can I use the
cmd line arg to be used to build the target I want ant to call?


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message