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 a BuildException is thrown. Since Ant 1.7.1
| 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.