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.

dependset.html 4.2 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. <html>
  2. <head>
  3. <meta http-equiv="Content-Language" content="en-us">
  4. <title>DependSet Task</title>
  5. </head>
  6. <body>
  7. <h2>DependSet</h2>
  8. A task to manage arbitrary dependencies between files.
  9. <h3>Description</h3>
  10. <p>
  11. The dependset task compares a set of source files with a set of target
  12. files. If any of the source files is more recent than any of
  13. the target files, all of the target files are removed.
  14. </p>
  15. <p>
  16. Source files and target files are specified via nested <a
  17. href="../CoreTypes/fileset.html">FileSets</a> and/or nested <a
  18. href="../CoreTypes/filelist.html">FileLists</a>. Arbitrarily many
  19. source and target filesets/filelists may be specified, but at
  20. least one filelist/fileset is required for both sources and targets.
  21. </p>
  22. <p>
  23. Use a FileSet when you want to use wildcard include or exclude
  24. patterns and don't care about missing files. Use a FileList when you
  25. want to consider the non-existence of a file as if it were out of
  26. date. If there are any non-existing files in any source or target
  27. FileList, all target files will be removed.
  28. </p>
  29. <p>
  30. DependSet is useful to capture dependencies that are not or cannot be
  31. determined algorithmically. For example, the &lt;style&gt; task only
  32. compares the source XML file and XSLT stylesheet against the target
  33. file to determined whether to restyle the source. Using dependset you
  34. can extend this dependency checking to include a DTD or XSD file as
  35. well as other stylesheets imported by the main stylesheet.
  36. </p>
  37. <h3>Parameters</h3>
  38. <p>
  39. (none)
  40. </p>
  41. <h3>Parameters Specified as Nested Elements</h3>
  42. <h4>srcfileset</h4>
  43. <p>
  44. The nested <code>srcfileset</code> element specifies a <a
  45. href="../CoreTypes/fileset.html">FileSet</a>. All files included in
  46. this fileset will be compared against all files included in all of the
  47. <code>targetfileset</code> filesets and <code>targetfilelist</code>
  48. filelists. Multiple <code>srcfileset</code> filesets may be specified.
  49. </p>
  50. <h4>srcfilelist</h4>
  51. <p>
  52. The nested <code>srcfilelist</code> element specifies a <a
  53. href="../CoreTypes/filelist.html">FileList</a>. All files included in
  54. this filelist will be compared against all files included in all of the
  55. <code>targetfileset</code> filesets and <code>targetfilelist</code>
  56. filelists. Multiple <code>srcfilelist</code> filelists may be specified.
  57. </p>
  58. <h4>targetfileset</h4>
  59. <p>
  60. The nested <code>targetfileset</code> element specifies a <a
  61. href="../CoreTypes/fileset.html">FileSet</a>. All files included in
  62. this fileset will be compared against all files included in all of the
  63. <code>srcfileset</code> filesets and <code>sourcefilelist</code>
  64. filelists, and if any are older, they are all deleted.
  65. </p>
  66. <h4>targetfilelist</h4>
  67. <p>
  68. The nested <code>targetfilelist</code> element specifies a <a
  69. href="../CoreTypes/filelist.html">FileList</a>. All files included in
  70. this filelist will be compared against all files included in all of the
  71. <code>srcfileset</code> filesets and <code>sourcefilelist</code>
  72. filelists, and if any are older, they are all deleted.
  73. </p>
  74. <h3>Examples</h3>
  75. <blockquote> <pre>
  76. &lt;dependset&gt;
  77. &lt;srcfilelist
  78. dir = &quot;${dtd.dir}&quot;
  79. files = &quot;paper.dtd,common.dtd&quot;/&gt;
  80. &lt;srcfilelist
  81. dir = &quot;${xsl.dir}&quot;
  82. files = &quot;common.xsl&quot;/&gt;
  83. &lt;srcfilelist
  84. dir = &quot;${basedir}&quot;
  85. files = &quot;build.xml&quot;/&gt;
  86. &lt;targetfileset
  87. dir = &quot;${output.dir}&quot;
  88. includes = &quot;**/*.html&quot;/&gt;
  89. &lt;/dependset&gt; </pre>
  90. </blockquote>
  91. <p>
  92. In this example derived HTML files in the ${output.dir} directory
  93. will be removed if any are out-of-date with respect to:</p>
  94. <ol>
  95. <li>the DTD of their source XML files</li>
  96. <li>a common DTD (imported by the main DTD)</li>
  97. <li>a subordinate XSLT stylesheet (imported by the main stylesheet), or</li>
  98. <li>the buildfile</li>
  99. </ol>
  100. <p>
  101. If any of the source files in the above example does not exist, all
  102. target files will also be removed. To ignore missing source files instead,
  103. use filesets instead of filelists for the source files.
  104. </p>
  105. <hr>
  106. <p align="center">Copyright &copy; 2001 Apache Software Foundation.
  107. All rights
  108. Reserved.</p>
  109. </body>
  110. </html>