Examples

<uptodate property="propelBuild.notRequired" targetfile="${deploy}/propelClasses.tgz" >
  <fileset dir="${src}/propel">
    <include="**/*.php"/>
  </fileset>
</uptodate>

The above example sets the property propelBuild.notRequired to true if the ${deploy}/propelClasses.tgz file is more up-to-date than any of the PHP class files in the ${src}/propel directory.

<target name="CompileTarget">
  <uptodate property="target.uptodate" targetfile="main">
    <fileset refid="sources"/>
  </uptodate>
  <if>
    <not><isset property="target.uptodate"/></not>
   <then>
      <!-- Some commands to update the target ... -->
   </then>
  </if>
</target>

The above example shows a common use when doing a "compile" type target where a single target depends on other source files. In this case the commands to update the target (whatever they are) are only run if any of the source files are more up to date than the target.