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
|
|
|
|
|
|
|
|
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>Antversion Task</title>
|
|
|
|
</head>
|
|
|
|
|
|
|
|
<body>
|
|
|
|
|
2018-01-22 23:52:21 +01:00
|
|
|
<h2 id="antversion">Antversion</h2>
|
2018-03-04 15:17:41 +01:00
|
|
|
<p><em>Since Ant 1.7.0</em></p>
|
2007-10-11 08:31:12 +00:00
|
|
|
<h3>Description</h3>
|
2018-03-04 15:17:41 +01:00
|
|
|
<p>Stores the Apache Ant version (when used as task) or checks for a specific Ant version (when used
|
|
|
|
as condition).</p>
|
2007-10-11 08:31:12 +00:00
|
|
|
|
2018-02-28 07:58:59 +01:00
|
|
|
<table class="attr">
|
2007-10-11 08:31:12 +00:00
|
|
|
<tr>
|
2018-05-15 10:29:27 +02:00
|
|
|
<th scope="col" rowspan="2">Attribute</th>
|
|
|
|
<th scope="col" rowspan="2">Description</th>
|
|
|
|
<th scope="col" colspan="2">Required</th>
|
2007-10-11 08:31:12 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
2018-05-15 10:29:27 +02:00
|
|
|
<th scope="col">Task</th>
|
|
|
|
<th scope="col">Condition</th>
|
2007-10-11 08:31:12 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
2018-02-28 07:58:59 +01:00
|
|
|
<td>atleast</td>
|
|
|
|
<td>The version that this Ant is of at least. The format
|
|
|
|
is <code>major.minor.point</code>.</td>
|
|
|
|
<td class="center">No</td>
|
|
|
|
<td rowspan="2">Exactly one of these</td>
|
2007-10-11 08:31:12 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
2018-02-28 07:58:59 +01:00
|
|
|
<td>exactly</td>
|
|
|
|
<td>The version that this Ant is of exactly. The format is <code>major.minor.point</code>.</td>
|
|
|
|
<td>No</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>property</td>
|
|
|
|
<td>The name of the property to set.</td>
|
|
|
|
<td class="center">Yes</td>
|
|
|
|
<td>Ignored</td>
|
2007-10-11 08:31:12 +00:00
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
|
|
|
|
<h3>Examples</h3>
|
|
|
|
|
2018-05-15 09:51:58 +02:00
|
|
|
<p>Store the current Ant version in the property <code>antversion</code>.</p>
|
2018-02-28 07:58:59 +01:00
|
|
|
<pre><antversion property="antversion"/></pre>
|
2007-10-11 08:31:12 +00:00
|
|
|
|
2018-05-15 09:51:58 +02:00
|
|
|
<p>Store the Ant version in the property <code>antversion</code> if the current Ant version is 1.6.0
|
|
|
|
or higher. Otherwise the property remains unset.</p>
|
2018-02-28 07:58:59 +01:00
|
|
|
<pre><antversion property="antversion" atleast="1.6"/></pre>
|
2007-10-11 08:31:12 +00:00
|
|
|
|
2018-05-15 09:51:58 +02:00
|
|
|
<p>Set the property <code>ant-is-exact-7</code> if Ant 1.7.0 is running. Neither 1.6.5 nor 1.7.1
|
2007-10-11 08:31:12 +00:00
|
|
|
would match.</p>
|
2018-05-15 09:51:58 +02:00
|
|
|
<pre><antversion property="ant-is-exact-7" exactly="1.7.0"/></pre>
|
2007-10-11 08:31:12 +00:00
|
|
|
|
2018-05-15 09:51:58 +02:00
|
|
|
<p>Set <code>Ant17isOnline</code> if Ant 1.7.0 is running and can get a non-error-response from the
|
|
|
|
Ant homepage.</p>
|
2018-02-09 06:54:03 +01:00
|
|
|
<pre>
|
2007-10-11 08:31:12 +00:00
|
|
|
<condition property="Ant17isOnline">
|
|
|
|
<and>
|
|
|
|
<antversion exactly="1.7.0"/>
|
|
|
|
<http url="http://ant.apache.org"/>
|
|
|
|
</and>
|
2018-02-28 07:58:59 +01:00
|
|
|
</condition></pre>
|
2007-10-11 08:31:12 +00:00
|
|
|
|
|
|
|
</body>
|
|
|
|
</html>
|