@@ -9,19 +9,24 @@
<h2><a name="uptodate">Uptodate</a></h2>
<h2><a name="uptodate">Uptodate</a></h2>
<h3>Description</h3>
<h3>Description</h3>
<p>Sets a property if a target files are more up to date than a set of
Source files. Source files are specified by nested <srcfiles>
elements, these are <a href="../CoreTypes/fileset.html">FileSet</a>s, while target
files are specified using a nested <a href="../CoreTypes/mapper.html">mapper</a>
element.</p>
<p>The value part of the property being set is <i>true</i> if the
timestamp of the target files is more recent than the timestamp of
every corresponding source file.</p>
<p>The default behavior is to use a <a href="../CoreTypes/mapper.html#merge-mapper">merge
mapper</a> with the <code>to</code> attribute set to the value of the
targetfile attribute.</p>
<p>Normally, this task is used to set properties that are useful to avoid target
execution depending on the relative age of the specified files.</p>
<p>Sets a property if a target file or set of target files is more up-to-date
than a source file or set of source files. A single source file is specified
using the <code>srcfile</code> attribute. A set of source files is specified
using the nested <code><srcfiles></code>
elements. These are <a href="../CoreTypes/fileset.html">FileSet</a>s,
whereas multiple target files are specified using a nested
<a href="../CoreTypes/mapper.html"><code><mapper></code></a> element.</p>
<p>By default, the value of the property is set to <code>true</code> if
the timestamp of the target file(s) is more recent than the timestamp of
the corresponding source file(s). You can set the value to something other
than the default by specifying the <code>value</code> attribute.</p>
<p>If a <code><srcfiles></code> element is used, without also specifying
a <code><mapper></code> element, the default behavior is to use a
<a href="../CoreTypes/mapper.html#merge-mapper">merge mapper</a>, with the
<code>to</code> attribute set to the value of the
<code>targetfile</code> attribute.</p>
<p>Normally, this task is used to set properties that are useful to avoid
target execution depending on the relative age of the specified files.</p>
<h3>Parameters</h3>
<h3>Parameters</h3>
<table border="1" cellpadding="2" cellspacing="0">
<table border="1" cellpadding="2" cellspacing="0">
<tr>
<tr>
@@ -31,36 +36,71 @@ execution depending on the relative age of the specified files.</p>
</tr>
</tr>
<tr>
<tr>
<td valign="top">property</td>
<td valign="top">property</td>
<td valign="top">t he name of the property to set.</td>
<td valign="top">T he name of the property to set.</td>
<td valign="top" align="center">Yes</td>
<td valign="top" align="center">Yes</td>
</tr>
</tr>
<tr>
<tr>
<td valign="top">value</td>
<td valign="top">value</td>
<td valign="top">the value to set the property to. Defaults to "true".</td>
<td valign="top" align="center">No</td>
<td valign="top">The value to set the property to.</td>
<td valign="top" align="center">No; defaults to <code>true</code>.</td>
</tr>
<tr>
<td valign="top">srcfile</td>
<td valign="top">The file to check against the target file.</td>
<td valign="top" align="center">Yes, unless a nested
<code><srcfiles></code> element is present.</td>
</tr>
</tr>
<tr>
<tr>
<td valign="top">targetfile</td>
<td valign="top">targetfile</td>
<td valign="top">the file for which we want to determine the status.</td>
<td valign="top" align="center">Yes, unless a nested mapper element is
present.</td>
<td valign="top">T he file for which we want to determine the status.</td>
<td valign="top" align="center">Yes, unless a nested
<code><mapper></code> element is present.</td>
</tr>
</tr>
</table>
</table>
<h3>Parameters specified as nested elements</h3>
<h4><a name="srcfiles">srcfiles</a></h4>
<p>The nested <code><srcfiles></code> element allows you to specify a
set of files to check against the target file(s).</p>
<p><strong>Note:</strong> You can specify either the <code>srcfile</code>
attribute or nested <code><srcfiles></code> elements, but not both.
<h4><a name="mapper">mapper</a></h4>
<p>The nested <code><mapper></code> element allows you to specify
a set of target files to check for being up-to-date with respect to a
set of source files.</p>
<p><strong>Note:</strong> The nested <code><mapper></code> element is
only valid when used with the <code><srcfiles></code> element.
<h3>Examples</h3>
<h3>Examples</h3>
<pre> <uptodate property="xmlBuild.notRequired" targetfile="${deploy}\xmlClasses.jar" >
<pre> <uptodate property="xmlBuild.notRequired" targetfile="${deploy}\xmlClasses.jar" >
<srcfiles dir= "${src}/xml" includes="**/*.dtd"/>
<srcfiles dir= "${src}/xml" includes="**/*.dtd"/>
</uptodate></pre>
</uptodate></pre>
<p>sets the property <code><i>xmlBuild.notRequired</i></code> to the value "true"
if the <i>${deploy}/xmlClasses.jar</i> is more up to date than any of the DTD files in the <i>${src}/xml</i> directory.</p>
<p>This can be written as</p>
<pre> <uptodate property="xmlBuild.notRequired" >
<p>sets the property <code>xmlBuild.notRequired</code> to <code>true</code>
if the <code>${deploy}/xmlClasses.jar</code> file is more up-to-date than
any of the DTD files in the <code>${src}/xml</code> directory.</p>
<p>This can be written as:</p>
<pre> <uptodate property="xmlBuild.notRequired">
<srcfiles dir= "${src}/xml" includes="**/*.dtd"/>
<srcfiles dir= "${src}/xml" includes="**/*.dtd"/>
<mapper type="merge" to="${deploy}\xmlClasses.jar"/>
<mapper type="merge" to="${deploy}\xmlClasses.jar"/>
</uptodate></pre>
</uptodate></pre>
<p>as well.</p>
as well.
</p>
<pre> <uptodate property="isUpToDate"
srcfile="/usr/local/bin/testit"
targetfile="${build}/.flagfile"/>
</pre>
<p>sets the property <code>isUpToDate</code> to <code>true</code>
if <code>/usr/local/bin/testit</code> is newer than
<code>${build}/.flagfile</code>.</p>
</p>
<hr>
<hr>
<p align="center">Copyright © 2001 Apache Software Foundation. All rights
Reserved.</p>
<p align="center">Copyright © 2001,2002 Apache Software Foundation.
All rights Reserved.</p>
</body>
</body>
</html>
</html>