B.8 ConditionTask
Prev | Appendix B. Core tasks | Next

## B.8 ConditionTask

Sets a property if a certain condition holds true - this is a generalization of Section B.5, “AvailableTask ” and Section B.37, “UpToDateTask ”.

If the condition holds true, the property value is set to true by default; otherwise, the property is not set. You can set the value to something other than the default by specifying the `value` attribute.

Conditions are specified as nested elements, you must specify exactly one condition - see conditions for a complete list of nested elements.

Table B.9: Attributes

Name | Type | Description | Default | Required
--- | --- | --- | --- | ---
`property` | `String` | The name of the property to set. | n/a | Yes
`value` | `String` | The value to set the property to. Defaults to "true". | `true` | No

### B.8.1 Examples

    <condition property="isMacOrWindows">
        <or>
          <os family="mac"/>
          <os family="windows"/>
        </or>
      </condition>

### B.8.2 Supported Nested Tags

- `or`

- `and`

Prev | Up | Next
B.7 ChownTask | Home | B.9 CopyTask