Name
condition
Synopsis
Sets a property if a condition is true
. This task
combines basic Boolean expressions with the
available
and uptodate
tasks.
Attributes
-
property
(1.4, String, Y) The name of a property to set if the condition is
true
. If the condition isfalse
, the property is not set.-
value
(1.4, String, N) The value assigned to the property if the condition is
true
. Defaults totrue
.
Content
The following elements are considered to be conditions. Exactly one condition must be nested directly within this task. These, in turn, may contain other nested conditions as outlined here.
-
<not>
Contains exactly one nested condition, negating its result. Does not have any attributes.
-
<and>
Contains any number of nested conditions, evaluating to
true
if all nested conditions aretrue
. Conditions are evaluated left-to-right, and evaluation stops if a condition evaluates tofalse
. [46] Does not have any attributes.-
<or>
Contains any number of nested conditions, evaluating to
true
if any nested condition istrue
. Conditions are evaluated left-to-right, and evaluation stops when a condition evaluates totrue
. [47] Does not have any attributes.-
<available>
Identical to the
available
task, except itsproperty
andvalue
attributes are ignored.-
<uptodate>
Identical to the
uptodate
task, except itsproperty
andvalue
attributes are ignored.-
<os>
Evaluates to
true
if the current operating system is of a given type. This element has an optionalfamily
attribute of typeString
. Legal values arewindows ...
Get Ant: The Definitive Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.