| <!-- Condition task --> |
| <external> |
| <description> |
| |
| <p>Sets a property if a certain condition holds true - this is a |
| generalization of <a href="available.html">Available</a> and <a |
| href="uptodate.html">Uptodate</a>.</p> |
| <p>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 <code>value</code> |
| attribute.</p> |
| <p>Conditions are specified as <a href="#nested">nested elements</a>, |
| you must specify exactly one condition.</p> |
| |
| </description> |
| |
| <section anchor="examples" name="Examples"> |
| |
| <pre> |
| <condition property="javamail.complete"> |
| <and> |
| <available classname="javax.activation.DataHandler" /> |
| <available classname="javax.mail.Transport" /> |
| </and> |
| </condition> |
| </pre> |
| <p>sets the property <code>javamail.complete</code> if both the |
| JavaBeans Activation Framework and JavaMail are available in the |
| classpath.</p> |
| |
| <pre> |
| <condition property="isMacOsButNotMacOsX"> |
| <and> |
| <os family="mac" /> |
| <not> |
| <os family="unix" /> |
| </not> |
| </and> |
| </condition> |
| </pre> |
| <p>sets the property <code>isMacOsButNotMacOsX</code> if the current |
| operating system is MacOS, but not MacOS X - which Ant considers to be |
| in the Unix family as well.</p> |
| |
| <pre> |
| <condition property="isSunOSonSparc"> |
| <os name="SunOS" arch="sparc" /> |
| </condition> |
| </pre> |
| <p>sets the property <code>isSunOSonSparc</code> if the current |
| operating system is SunOS and if it is running on a sparc architecture.</p> |
| |
| </section> |
| </external> |