Javatpoint Logo
Javatpoint Logo

Apache Ant Condition Task

It is used to make conditional task, it sets property if the certain condition holds true.

If the condition holds true, the property value is set to true by default otherwise, the property is not set. We can set a value to something other than the default by specifying a new value to the value attribute.

We must specify exactly one condition and can also specify as nested elements.

Apache Ant Condition Attributes

Attribute Description Required
property Property name which to be set. Yes
value Value to set the property. No
else The value to set the property to if the condition evaluates to false. No

Apache Ant Condition Example

Set the property javamail.complete if both the JavaBeans Activation Framework and JavaMail are available in the classpath.

Youtube For Videos Join Our Youtube Channel: Join Now


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Trending Technologies

B.Tech / MCA