2018-12-21 11:20:43 +01:00
|
|
|
<!DOCTYPE html>
|
2007-10-11 08:31:12 +00:00
|
|
|
<!--
|
|
|
|
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
|
|
|
|
|
2019-05-25 13:41:47 +02:00
|
|
|
https://www.apache.org/licenses/LICENSE-2.0
|
2007-10-11 08:31:12 +00:00
|
|
|
|
|
|
|
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.
|
|
|
|
-->
|
2018-12-21 11:20:43 +01:00
|
|
|
<html lang="en">
|
2007-10-11 08:31:12 +00:00
|
|
|
|
|
|
|
<head>
|
|
|
|
<link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
|
|
|
|
<title>Retry Task</title>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<h2>Retry</h2>
|
2018-03-04 15:17:41 +01:00
|
|
|
<p><em>Since Apache Ant 1.7.1</em></p>
|
2007-10-11 08:31:12 +00:00
|
|
|
<h3>Description</h3>
|
2018-02-28 07:58:59 +01:00
|
|
|
<p><code>Retry</code> is a container which executes a single nested task until either: there is no
|
2018-03-10 20:17:33 +01:00
|
|
|
failure; or: its <var>retrycount</var> has been exceeded. If this happens
|
|
|
|
a <code>BuildException</code> is thrown.</p>
|
2007-10-11 08:31:12 +00:00
|
|
|
|
|
|
|
<h3>Parameters</h3>
|
2018-02-28 07:58:59 +01:00
|
|
|
<table class="attr">
|
2018-01-22 23:52:21 +01:00
|
|
|
<tr>
|
2018-05-15 10:29:27 +02:00
|
|
|
<th scope="col">Attribute</th>
|
|
|
|
<th scope="col">Description</th>
|
|
|
|
<th scope="col">Required</th>
|
2007-10-11 08:31:12 +00:00
|
|
|
</tr>
|
2018-01-22 23:52:21 +01:00
|
|
|
<tr>
|
2018-02-28 07:58:59 +01:00
|
|
|
<td>retrycount</td>
|
|
|
|
<td>number of times to attempt to execute the nested task</td>
|
|
|
|
<td>Yes</td>
|
2007-10-11 08:31:12 +00:00
|
|
|
</tr>
|
2018-01-22 23:52:21 +01:00
|
|
|
<tr>
|
2018-02-28 07:58:59 +01:00
|
|
|
<td>retrydelay</td>
|
|
|
|
<td>number of milliseconds to wait between retry attempts task. <em>Since Apache Ant
|
|
|
|
1.8.3</em></td>
|
|
|
|
<td>No; defaults to no delay</td>
|
2012-02-01 12:47:03 +00:00
|
|
|
</tr>
|
2007-10-11 08:31:12 +00:00
|
|
|
</table>
|
|
|
|
<p>Any valid Ant task may be embedded within the retry task.</p>
|
|
|
|
|
|
|
|
<h3>Example</h3>
|
2018-05-15 09:51:58 +02:00
|
|
|
<p>This example shows how to use <code><retry></code> to wrap a task which must interact with
|
|
|
|
an unreliable network resource.</p>
|
2007-10-11 08:31:12 +00:00
|
|
|
<pre>
|
|
|
|
<retry retrycount="3">
|
2019-05-25 15:38:31 +02:00
|
|
|
<get src="https://www.unreliable-server.com/unreliable.tar.gz"
|
2018-02-28 07:58:59 +01:00
|
|
|
dest="/home/retry/unreliable.tar.gz"/>
|
|
|
|
</retry></pre>
|
2007-10-11 08:31:12 +00:00
|
|
|
</body>
|
|
|
|
</html>
|