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.4 KiB

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