Since Apache Ant 1.7.1
Retry is a container which executes a single nested task until either: there is no
failure; or: its retrycount has been exceeded. If this happens
BuildException is thrown.
|retrycount||number of times to attempt to execute the nested task||Yes|
|retrydelay||number of milliseconds to wait between retry attempts task. Since Apache Ant 1.8.3||No; defaults to no delay|
Any valid Ant task may be embedded within the retry task.
This example shows how to use
<retry> to wrap a task which must interact with
an unreliable network resource.
<retry retrycount="3"> <get src="https://www.unreliable-server.com/unreliable.tar.gz" dest="/home/retry/unreliable.tar.gz"/> </retry>