blob: 8fb80bc9d75d86f8f1cbef89c1e6f8fa14c4b8d6 [file] [log] [blame]
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<title>Uptodate Task</title>
</head>
<body>
<h2><a name="uptodate">Uptodate</a></h2>
<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 &lt;srcfiles&gt;
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>
<h3>Parameters</h3>
<table border="1" cellpadding="2" cellspacing="0">
<tr>
<td valign="top"><b>Attribute</b></td>
<td valign="top"><b>Description</b></td>
<td align="center" valign="top"><b>Required</b></td>
</tr>
<tr>
<td valign="top">property</td>
<td valign="top">the name of the property to set.</td>
<td valign="top" align="center">Yes</td>
</tr>
<tr>
<td valign="top">value</td>
<td valign="top">the value to set the property to. Defaults to &quot;true&quot;.</td>
<td valign="top" align="center">No</td>
</tr>
<tr>
<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>
</tr>
</table>
<h3>Examples</h3>
<pre> &lt;uptodate property=&quot;xmlBuild.notRequired&quot; targetfile=&quot;${deploy}\xmlClasses.jar&quot; &gt;
&lt;srcfiles dir= &quot;${src}/xml&quot; includes=&quot;**/*.dtd&quot;/&gt;
&lt;/uptodate&gt;</pre>
<p>sets the property <code><i>xmlBuild.notRequired</i></code> to the value &quot;true&quot;
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> &lt;uptodate property=&quot;xmlBuild.notRequired&quot; &gt;
&lt;srcfiles dir= &quot;${src}/xml&quot; includes=&quot;**/*.dtd&quot;/&gt;
&lt;mapper type=&quot;merge&quot; to=&quot;${deploy}\xmlClasses.jar&quot;/&gt;
&lt;/uptodate&gt;</pre>
<p>as well.</p>
<hr>
<p align="center">Copyright &copy; 2001 Apache Software Foundation. All rights
Reserved.</p>
</body>
</html>