ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rebhan, Gilbert" <>
Subject RE: Conditionally execute copy task
Date Fri, 26 Sep 2008 09:21:01 GMT

-----Original Message-----
From: "Spilker, Jörg" []
Sent: Friday, September 26, 2008 11:03 AM
To: ''
Subject: Conditionally execute copy task


i want to copy some files only if some property is set to true. Is this
possible? There is the condition tasks, but it only sets a property based on
prerequisites. I didn´t found anything like an <if> tasks or similar.

Greetings, Jörg

your condition sets a property ${mustcopy} and then

<target name="yourcopytask" if="mustcopy">
runs only if mustcopy is set

the same vice versa

<target name="...." unless="someproperty">
runs only if someproperty is not set


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

View raw message