You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

retry.html 2.0 KiB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <!--
  2. Licensed to the Apache Software Foundation (ASF) under one or more
  3. contributor license agreements. See the NOTICE file distributed with
  4. this work for additional information regarding copyright ownership.
  5. The ASF licenses this file to You under the Apache License, Version 2.0
  6. (the "License"); you may not use this file except in compliance with
  7. the License. You may obtain a copy of the License at
  8. http://www.apache.org/licenses/LICENSE-2.0
  9. Unless required by applicable law or agreed to in writing, software
  10. distributed under the License is distributed on an "AS IS" BASIS,
  11. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. See the License for the specific language governing permissions and
  13. limitations under the License.
  14. -->
  15. <html>
  16. <head>
  17. <meta http-equiv="Content-Language" content="en-us">
  18. <link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
  19. <title>Retry Task</title>
  20. </head>
  21. <body>
  22. <h2>Retry</h2>
  23. <h3>Description</h3>
  24. <p>Retry is a container which executes a single nested task until either: there is no failure; or:
  25. its <em>retrycount</em> has been exceeded. If this happens a BuildException is thrown.
  26. <em>Since Ant 1.7.1</em></p>
  27. <h3>Parameters</h3>
  28. <table border="1" cellpadding="2" cellspacing="0">
  29. <tr>
  30. <td valign="top"><b>Attribute</b></td>
  31. <td valign="top"><b>Description</b></td>
  32. <td align="center" valign="top"><b>Required</b></td>
  33. </tr>
  34. <tr>
  35. <td valign="top">retrycount</td>
  36. <td valign="top">number of times to attempt to execute the nested task</td>
  37. <td valign="top" align="center">Yes</td>
  38. </tr>
  39. </table>
  40. <p>Any valid Ant task may be embedded within the retry task.</p>
  41. <h3>Example</h3>
  42. <pre>
  43. &lt;retry retrycount="3"&gt;
  44. &lt;get src="http://www.unreliable-server.com/unreliable.tar.gz"
  45. dest="/home/retry/unreliable.tar.gz" /&gt;
  46. &lt;/retry&gt;
  47. </pre>
  48. <p>This example shows how to use <code>&lt;retry&gt;</code> to wrap a task which must interact with an unreliable network resource.</p>
  49. </body>
  50. </html>