You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

uptodate.html 2.6 KiB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <html>
  2. <head>
  3. <meta http-equiv="Content-Language" content="en-us">
  4. <title>Ant User Manual</title>
  5. </head>
  6. <body>
  7. <h2><a name="uptodate">Uptodate</a></h2>
  8. <h3>Description</h3>
  9. <p>Sets a property if a target files are more up to date than a set of
  10. Source files. Source files are specified by nested &lt;srcfiles&gt;
  11. elements, these are <a href="../CoreTypes/fileset.html">FileSet</a>s, while target
  12. files are specified using a nested <a href="../CoreTypes/mapper.html">mapper</a>
  13. element.</p>
  14. <p>The value part of the property being set is <i>true</i> if the
  15. timestamp of the target files is more recent than the timestamp of
  16. every corresponding source file.</p>
  17. <p>The default behavior is to use a <a href="../CoreTypes/mapper.html#merge-mapper">merge
  18. mapper</a> with the <code>to</code> attribute set to the value of the
  19. targetfile attribute.</p>
  20. <p>Normally, this task is used to set properties that are useful to avoid target
  21. execution depending on the relative age of the specified files.</p>
  22. <h3>Parameters</h3>
  23. <table border="1" cellpadding="2" cellspacing="0">
  24. <tr>
  25. <td valign="top"><b>Attribute</b></td>
  26. <td valign="top"><b>Description</b></td>
  27. <td align="center" valign="top"><b>Required</b></td>
  28. </tr>
  29. <tr>
  30. <td valign="top">property</td>
  31. <td valign="top">the name of the property to set.</td>
  32. <td valign="top" align="center">Yes</td>
  33. </tr>
  34. <tr>
  35. <td valign="top">value</td>
  36. <td valign="top">the value to set the property to. Defaults to &quot;true&quot;.</td>
  37. <td valign="top" align="center">No</td>
  38. </tr>
  39. <tr>
  40. <td valign="top">targetfile</td>
  41. <td valign="top">the file for which we want to determine the status.</td>
  42. <td valign="top" align="center">Yes, unless a nested mapper element is
  43. present.</td>
  44. </tr>
  45. </table>
  46. <h3>Examples</h3>
  47. <pre> &lt;uptodate property=&quot;xmlBuild.notRequired&quot; targetfile=&quot;${deploy}\xmlClasses.jar&quot; &gt;
  48. &lt;srcfiles dir= &quot;${src}/xml&quot; includes=&quot;**/*.dtd&quot;/&gt;
  49. &lt;/uptodate&gt;</pre>
  50. <p>sets the property <code><i>xmlBuild.notRequired</i></code> to the value &quot;true&quot;
  51. 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>
  52. <p>This can be written as</p>
  53. <pre> &lt;uptodate property=&quot;xmlBuild.notRequired&quot; &gt;
  54. &lt;srcfiles dir= &quot;${src}/xml&quot; includes=&quot;**/*.dtd&quot;/&gt;
  55. &lt;mapper type=&quot;merge&quot; to=&quot;${deploy}\xmlClasses.jar&quot;/&gt;
  56. &lt;/uptodate&gt;</pre>
  57. <p>as well.</p>
  58. <hr>
  59. <p align="center">Copyright &copy; 2000,2001 Apache Software Foundation. All rights
  60. Reserved.</p>
  61. </body>
  62. </html>