Retry is a container task - it can contain an Ant task. The nested task is executed, if an error occurs, the task can be executed again without the build failing. The amount of times that the nested task can be 'retried' is configurable.
Attribute | Description | Required |
retrycount | number of times to attempt to execute the nested task | Yes |
Any valid Ant task may be embedded within the retry task.
<retry retrycount="3"> <get src="http://www.unreliable-server.com/unreliable.tar.gz" dest="/home/retry/unreliable.tar.gz"/> </retry>
This example shows how to use <retry>
to wrap a task which must interact with an unreliable network resource.