ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anderson, Rob (Global Trade)" <Rob.Ander...@nike.com>
Subject RE: newbie help: conditional exec
Date Tue, 11 Sep 2007 17:58:08 GMT
Use the if attribute of <target>...

<target name="exec-something" if="artAvailable">
 <exec ...
</target>

Be aware that this does not test the value of the artAvailable property,
only whether or not it exists. See the manual for more info.

http://ant.apache.org/manual/using.html#targets


-Rob Anderson

> -----Original Message-----
> From: Mario Madunic [mailto:hajduk@imag.net] 
> Sent: Tuesday, September 11, 2007 10:40 AM
> To: user@ant.apache.org
> Subject: newbie help: conditional exec
> 
> I have the following in my ant task to test for the existence 
> of an xml file after processing
> 
> <available file="CSV\csvArt.xml" property="artAvailable" />
> 
> What I want to do is run <exec> based on the above property 
> value of true. I can't seem to find a task to do this. Any 
> help will be appreciated.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For 
> additional commands, e-mail: user-help@ant.apache.org
> 
> 
> 


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


Mime
View raw message