<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 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.