| <!-- |
| Licensed to the Apache Software Foundation (ASF) under one or more |
| contributor license agreements. See the NOTICE file distributed with |
| this work for additional information regarding copyright ownership. |
| The ASF licenses this file to You under the Apache License, Version 2.0 |
| (the "License"); you may not use this file except in compliance with |
| the License. You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
| --> |
| <html> |
| |
| <head> |
| <meta http-equiv="Content-Language" content="en-us"> |
| <link rel="stylesheet" type="text/css" href="../stylesheets/style.css"> |
| <title>Retry Task</title> |
| </head> |
| <body> |
| <h2>Retry</h2> |
| <h3>Description</h3> |
| <p>Retry is a container which executes a single nested task until either: there is no failure; or: |
| its <em>retrycount</em> has been exceeded. If this happens a BuildException is thrown. |
| <em>Since Apache Ant 1.7.1</em></p> |
| |
| <h3>Parameters</h3> |
| <table border="1" cellpadding="2" cellspacing="0"> |
| <tr> |
| <td valign="top"><b>Attribute</b></td> |
| <td valign="top"><b>Description</b></td> |
| <td align="center" valign="top"><b>Required</b></td> |
| </tr> |
| <tr> |
| <td valign="top">retrycount</td> |
| <td valign="top">number of times to attempt to execute the nested task</td> |
| <td valign="top" align="center">Yes</td> |
| </tr> |
| <tr> |
| <td valign="top">retrydelay</td> |
| <td valign="top">number of milliseconds to wait between retry attempts |
| task. <em>Since Apache Ant 1.8.3</em></td> |
| <td valign="top" align="center">No, defaults to no delay</td> |
| </tr> |
| </table> |
| <p>Any valid Ant task may be embedded within the retry task.</p> |
| |
| <h3>Example</h3> |
| <pre> |
| <retry retrycount="3"> |
| <get src="http://www.unreliable-server.com/unreliable.tar.gz" |
| dest="/home/retry/unreliable.tar.gz" /> |
| </retry> |
| </pre> |
| <p>This example shows how to use <code><retry></code> to wrap a task which must interact with an unreliable network resource.</p> |
| </body> |
| </html> |