Mega Code Archive

 
Categories / Java Tutorial / Ant
 

Check condition

<?xml version="1.0"?> <project name="Apache Ant Properties Project" basedir=".">      <condition property="is.windows">     <os family="windows"/>   </condition>   <condition property="is.unix">     <os family="unix"/>   </condition>   <target name="do-windows" if="is.windows">     <echo message="This is Windows"/>   </target>   <target name="do-unix" if="is.unix">     <echo message="This is Unix"/>   </target> </project>