|
DependSetA task to manage arbitrary dependencies between files.DescriptionThe 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. Source files and target files are specified via nested FileSets and/or nested FileLists. Arbitrarily many source and target filesets/filelists may be specified, but at least one filelist/fileset is required for both sources and targets. 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. 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. Parameters(none) Parameters Specified as Nested Elementssrcfileset
The nested srcfilelist
The nested targetfileset
The nested targetfilelist
The nested Examples<dependset> <srcfilelist dir = "${dtd.dir}" files = "paper.dtd,common.dtd"/> <srcfilelist dir = "${xsl.dir}" files = "common.xsl"/> <srcfilelist dir = "${basedir}" <targetfileset dir = "${output.dir}" includes = "**/*.html"/> </dependset> In this example derived HTML files in the ${output.dir} directory will be removed if any are out-of-date with respect to:
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. Copyright © 2001 Apache Software Foundation. All rights Reserved. |