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