<condition>

The <condition> task builds on the <available> task. It offers more flexibility when you want to conditionally set a property. Rather than specifying the condition as attribute values, <condition> is specified using nested elements as described in the next subsection. The attributes that can be specified are listed in Table 4.13.

Table 4.13. Table of <condition> Attributes
Attributes Description
Required
property The name of the property to set.
Optional
value The value to give to the property if the condition evaluates to true. Defaults to true.

Nested Elements

The <condition> task supports a number of different nested elements as described in the following sections.

<not>, <and>, <or>

The <not>, <and>, and <or> elements behave ...

Get Ant Developer’s Handbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.