Just did something similar to this using antcall and recursion.  One
routine to check/wait for a windows service to reach a desired state and
another to check/wait for files in a directory to reach a certain state.

The routines being called invoke the <sleep> and the conditions for
early exit, the caller specifies how many times (max) to call.

It's a little convoluted but can be done without extending ant.

Thanks
-Mark




 
This e-mail message, and any attachments, is intended only for the use of the 
individual or entity identified in the alias address of this message and may 
contain information that is confidential, privileged and subject to legal 
restrictions and penalties regarding its unauthorized disclosure and use. Any 
unauthorized review, copying, disclosure, use or distribution is strictly 
prohibited. If you have received this e-mail message in error, please notify 
the sender immediately by reply e-mail and delete this message, and any 
attachments, from your system. Thank you. 

-----Original Message-----

From: Keith Hatton [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, February 14, 2007 10:14 AM
To: Ant Users List
Subject: RE: Does this work with Ant?

It sounds like a combination of <waitfor> and <fail> might meet your
basic requirements, though you may have to provide your own condition
implementation depending on what "the task" is.
http://ant.apache.org/manual/index.html

Keith


-----Original Message-----
From: Hans Schwaebli [mailto:[EMAIL PROTECTED] 
Sent: 14 February 2007 15:01
To: Ant Users List
Subject: Does this work with Ant?


How to do this in Ant:
   
  Call a task every x seconds for x minutes until the task completes
successful. If the task completes successful, the build continues to the
next statement. If the task is not successful after the maximum minutes
are reached, fail.
   
  Write a Java class to encapsulate this or can this be done in Ant?

 
---------------------------------
Sucker-punch spam with award-winning protection.
 Try the free Yahoo! Mail Beta.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to