next up previous contents index
Next: Supported conditions Up: Condition Previous: Parameters   Contents   Index

Parameters specified as nested elements

All conditions to test are specified as nested elements, for a complete list see here.

Examples

  <condition property="javamail.complete">
    <and>
      <available classname="javax.activation.DataHandler"/>
      <available classname="javax.mail.Transport"/>
    </and>
  </condition>
sets the property javamail.complete if both the JavaBeans Activation Framework and JavaMail are available in the classpath.
  <condition property="isMacOsButNotMacOsX">
    <and>
      <os family="mac"/>

      <not>
        <os family="unix"/>

      </not>
    </and>
  </condition>
sets the property isMacOsButNotMacOsX if the current operating system is MacOS, but not MacOS X - which Ant considers to be in the Unix family as well.
  <condition property="isSunOSonSparc">
    <os name="SunOS" arch="sparc"/>

  </condition>
sets the property isSunOSonSparc if the current operating system is SunOS and if it is running on a sparc architecture.



Andrew Marlow 2003-07-08