ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephane Bailliez <sbaill...@imediation.com>
Subject RE: Skipping a task when <condition>?
Date Mon, 22 Jan 2001 18:35:34 GMT

Look into uptodate and available tasks.

http://jakarta.apache.org/ant/jakarta-ant/docs/index.html#uptodate
http://jakarta.apache.org/ant/jakarta-ant/docs/index.html#available

You can use them to set some properties and then use the conditional
'if'/'unless' on targets to perform copying or not.
It just depends on what condition for you can decide if its worth copying or
not.

-- 
 St├ęphane Bailliez 
 Software Engineer, Paris - France 
 iMediation - http://www.imediation.com 
 Disclaimer: All the opinions expressed above are mine and not those from my
company. 



> -----Original Message-----
> From: William Lee [mailto:wlee@sendmail.com]
> Sent: Monday, January 22, 2001 6:49 PM
> To: Ant User
> Subject: Skipping a task when <condition>?
> 
> 
> What I realized when using Ant is that rerunning some tasks may take a
> long time, even though the tasks may not be doing anything different,
> like copying the 10592 files to a different directory.  What I would
> like to do is to write something that detects that the files 
> are already
> copied, like the existance of the directory, and then decide 
> I can skip
> the copying.  What is the proper way to accomplish this in Ant?  It
> would be ideal if there is an optional "condition" for running each
> task, when the condition is met, then the task would be skipped. 
> Anyway, any suggestions on how to do this is very welcomed.
> 
> Thanks,
> Will
> 

Mime
View raw message