| <html> |
| |
| <head> |
| <meta http-equiv="Content-Language" content="en-us"> |
| <title>Ant User Manual</title> |
| </head> |
| |
| <body> |
| |
| <h2>DependSet</h2> |
| |
| A task to manage arbitrary dependencies between files. |
| |
| <h3>Description</h3> |
| |
| <p> |
| The dependset task compares a set of source files with a set of target |
| files. If any of the source files is more recent than any of |
| the target files, all of the target files are removed. |
| </p> |
| <p> |
| Source files and target files are specified via nested <a |
| href="../CoreTypes/fileset.html">FileSets</a> and/or nested <a |
| href="../CoreTypes/filelist.html">FileLists</a>. Arbitrarily many |
| source and target filesets/filelists may be specified, but at |
| least one filelist/fileset is required for both sources and targets. |
| </p> |
| <p> |
| Use a FileSet when you want to use wildcard include or exclude |
| patterns and don't care about missing files. Use a FileList when you |
| want to consider the non-existence of a file as if it were out of |
| date. If there are any non-existing files in any source or target |
| FileList, all target files will be removed. |
| </p> |
| <p> |
| DependSet is useful to capture dependencies that are not or cannot be |
| determined algorithmically. For example, the <style> task only |
| compares the source XML file and XSLT stylesheet against the target |
| file to determined whether to restyle the source. Using dependset you |
| can extend this dependency checking to include a DTD or XSD file as |
| well as other stylesheets imported by the main stylesheet. |
| </p> |
| |
| <h3>Parameters</h3> |
| |
| <p> |
| (none) |
| </p> |
| |
| <h3>Parameters Specified as Nested Elements</h3> |
| |
| <h4>srcfileset</h4> |
| |
| <p> |
| The nested <code>srcfileset</code> element specifies a <a |
| href="../CoreTypes/fileset.html">FileSet</a>. All files included in |
| this fileset will be compared against all files included in all of the |
| <code>targetfileset</code> filesets and <code>targetfilelist</code> |
| filelists. Multiple <code>srcfileset</code> filesets may be specified. |
| </p> |
| |
| <h4>srcfilelist</h4> |
| |
| <p> |
| The nested <code>srcfilelist</code> element specifies a <a |
| href="../CoreTypes/filelist.html">FileList</a>. All files included in |
| this filelist will be compared against all files included in all of the |
| <code>targetfileset</code> filesets and <code>targetfilelist</code> |
| filelists. Multiple <code>srcfilelist</code> filelists may be specified. |
| </p> |
| |
| <h4>targetfileset</h4> |
| |
| <p> |
| The nested <code>targetfileset</code> element specifies a <a |
| href="../CoreTypes/fileset.html">FileSet</a>. All files included in |
| this fileset will be compared against all files included in all of the |
| <code>srcfileset</code> filesets and <code>sourcefilelist</code> |
| filelists, and if any are older, they are all deleted. |
| </p> |
| |
| <h4>targetfilelist</h4> |
| |
| <p> |
| The nested <code>targetfilelist</code> element specifies a <a |
| href="../CoreTypes/filelist.html">FileList</a>. All files included in |
| this filelist will be compared against all files included in all of the |
| <code>srcfileset</code> filesets and <code>sourcefilelist</code> |
| filelists, and if any are older, they are all deleted. |
| </p> |
| |
| <h3>Examples</h3> |
| <blockquote> <pre> |
| <dependset> |
| <srcfilelist |
| dir = "${dtd.dir}" |
| files = "paper.dtd,common.dtd"/> |
| <srcfilelist |
| dir = "${xsl.dir}" |
| files = "common.xsl"/> |
| <srcfilelist |
| dir = "${basedir}" |
| files = "build.xml"/> |
| <targetfileset |
| dir = "${output.dir}" |
| includes = "**/*.html"/> |
| </dependset> </pre> |
| </blockquote> |
| |
| <p> |
| In this example derived HTML files in the ${output.dir} directory |
| will be removed if any are out-of-date with respect to: |
| <olist> |
| <li>the DTD of their source XML files</li> |
| <li>a common DTD (imported by the main DTD)</li> |
| <li>a subordinate XSLT stylesheet (imported by the main stylesheet), or</li> |
| <li>the buildfile</li> |
| </olist> |
| </p> |
| <p> |
| If any of the source files in the above example does not exist, all |
| target files will also be removed. To ignore missing source files instead, |
| use filesets instead of filelists for the source files. |
| </p> |
| |
| <hr> |
| <p align="center">Copyright © 2000,2001 Apache Software Foundation. |
| All rights |
| Reserved.</p> |
| |
| </body> |
| </html> |