From 44838dc2382355b16d46833badf7ff7429ef99e3 Mon Sep 17 00:00:00 2001 From: Jan Materne Date: Fri, 2 Mar 2007 12:35:02 +0000 Subject: [PATCH] Document task. git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@513733 13f79535-47bb-0310-9956-ffa450edef68 --- docs/manual/CoreTasks/antversion.html | 95 +++++++++++++++++++++++++++ docs/manual/CoreTasks/conditions.html | 32 +-------- docs/manual/coretasklist.html | 1 + 3 files changed, 99 insertions(+), 29 deletions(-) create mode 100644 docs/manual/CoreTasks/antversion.html diff --git a/docs/manual/CoreTasks/antversion.html b/docs/manual/CoreTasks/antversion.html new file mode 100644 index 000000000..413d630c2 --- /dev/null +++ b/docs/manual/CoreTasks/antversion.html @@ -0,0 +1,95 @@ + + + + + + +Antversion Task + + + + +

Antversion

+

Description

+

+Stores the Ant version (when used as task) or checks for a specific Ant version +(when used as condition). +Since Ant 1.7.0 +

+ + + + + + + + + + + + + + + + + + + + + + + + + +
AttributeDescriptionRequired (Task)Required (Condition)
atleastThe version that this at least. + The format is major.minor.point.NoOne of these.
exactlyThe version that this ant is exactly. + The format is major.minor.point.No
propertyThe name of the property to set.YesNo (ignored)
+ + +

Examples

+ +
+<antversion property="antversion"/>
+
+

Stores the current Ant version in the property antversion.

+ +
+<antversion property="antversion" atleast="1.6"/>
+
+

Stores the Ant version in the property antversion if the current Ant version is 1.6.0 +or higher. Otherwise the property remains unset.

+ +
+<antversion property="ant-is-exact-7" exactly="1.7.0"/>
+
+

Sets the property ant-is-exact-7 if Ant 1.7.0 is running. Neither 1.6.5 nor 1.7.0 +would match.

+ +
+<condition property="Ant17isOnline">
+  <and>
+    <antversion exactly="1.7.0"/>
+    <http url="http://ant.apache.org"/>
+  </and>
+</condition>
+
+

Sets Ant17isOnline if Ant 1.7.0 is running and can get a non-error-response from +the Ant homepage.

+ + + diff --git a/docs/manual/CoreTasks/conditions.html b/docs/manual/CoreTasks/conditions.html index 438e6bbc6..a273ab9da 100644 --- a/docs/manual/CoreTasks/conditions.html +++ b/docs/manual/CoreTasks/conditions.html @@ -920,37 +920,11 @@ must match. Since Ant 1.7 </au:assertFalse>

antversion

+

This condition is identical to the Antversion task, all attributes are supported, the property attribute +is redundant and will be ignored.

-

- Test the ant version. - Since Ant 1.7.0

- - - - - - - - - - - - - - - -
AttributeDescriptionRequired
atleastThe version that this at least. - The format is major.minor.point.One of these.
exactlyThe version that this ant is exactly. - The format is major.minor.point.
-

- An example: -

-
-<condition property="ant-is-exact-7">
-  <antversion exactly="1.7.0"/>
-</condition>
-

hasfreespace

diff --git a/docs/manual/coretasklist.html b/docs/manual/coretasklist.html index 83cfba143..6e9f5896d 100644 --- a/docs/manual/coretasklist.html +++ b/docs/manual/coretasklist.html @@ -35,6 +35,7 @@ Ant
AntCall
AntStructure
+AntVersion
Apply/ExecOn
Apt
Available