Return-Path: Mailing-List: contact ant-user-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list ant-user@jakarta.apache.org Received: (qmail 54248 invoked from network); 22 Jan 2001 18:31:31 -0000 Received: from unknown (HELO ?195.115.98.1?) (195.115.98.1) by h31.sny.collab.net with SMTP; 22 Jan 2001 18:31:31 -0000 Received: from maileu.imediation.com by [195.115.98.1] via smtpd (for h31.sny.collab.net [64.208.42.41]) with SMTP; 22 Jan 2001 19:31:17 UT Received: (private information removed) Message-ID: <9B3E950CB293D411ADF4009027B0A4D27B1309@PARSV011> From: Stephane Bailliez To: ant-user@jakarta.apache.org Subject: RE: Skipping a task when ? Date: Mon, 22 Jan 2001 18:35:34 -0000 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C084A2.1B19D4E0" X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_001_01C084A2.1B19D4E0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable 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. --=20 St=E9phane Bailliez=20 Software Engineer, Paris - France=20 iMediation - http://www.imediation.com=20 Disclaimer: All the opinions expressed above are mine and not those = from my company.=20 > -----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 ? >=20 >=20 > 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=20 > are already > copied, like the existance of the directory, and then decide=20 > 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.=20 > Anyway, any suggestions on how to do this is very welcomed. >=20 > Thanks, > Will >=20 ------_=_NextPart_001_01C084A2.1B19D4E0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable RE: Skipping a task when <condition>?

Look into uptodate and available tasks.

http://jakarta.apache.org/ant/jakarta-ant/docs/index.h= tml#uptodate
http://jakarta.apache.org/ant/jakarta-ant/docs/index.h= tml#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=E9phane 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
>

------_=_NextPart_001_01C084A2.1B19D4E0--