source: release-kits/lirk3/resources/gs3-release-maker/apache-ant-1.6.5/docs/manual/CoreTasks/dependset.html@ 14982

Last change on this file since 14982 was 14982, checked in by oranfry, 16 years ago

initial import of LiRK3

File size: 4.4 KB
Line 
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
13A task to manage arbitrary dependencies between files.
14
15<h3>Description</h3>
16
17<p>
18The dependset task compares a set of source files with a set of target
19files. If any of the source files is more recent than any of
20the target files, all of the target files are removed.
21</p>
22<p>
23Source files and target files are specified via nested <a
24href="../CoreTypes/fileset.html">FileSets</a> and/or nested <a
25href="../CoreTypes/filelist.html">FileLists</a>. Arbitrarily many
26source and target filesets/filelists may be specified, but at
27least one filelist/fileset is required for both sources and targets.
28</p>
29<p>
30Use a FileSet when you want to use wildcard include or exclude
31patterns and don't care about missing files. Use a FileList when you
32want to consider the non-existence of a file as if it were out of
33date. If there are any non-existing files in any source or target
34FileList, all target files will be removed.
35</p>
36<p>
37DependSet is useful to capture dependencies that are not or cannot be
38determined algorithmically. For example, the <code>&lt;style&gt;</code> task only
39compares the source XML file and XSLT stylesheet against the target
40file to determined whether to restyle the source. Using dependset you
41can extend this dependency checking to include a DTD or XSD file as
42well 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>
56The nested <code>srcfileset</code> element specifies a <a
57href="../CoreTypes/fileset.html">FileSet</a>. All files included in
58this fileset will be compared against all files included in all of the
59<code>targetfileset</code> filesets and <code>targetfilelist</code>
60filelists. Multiple <code>srcfileset</code> filesets may be specified.
61</p>
62
63<h4>srcfilelist</h4>
64
65<p>
66The nested <code>srcfilelist</code> element specifies a <a
67href="../CoreTypes/filelist.html">FileList</a>. All files included in
68this filelist will be compared against all files included in all of the
69<code>targetfileset</code> filesets and <code>targetfilelist</code>
70filelists. Multiple <code>srcfilelist</code> filelists may be specified.
71</p>
72
73<h4>targetfileset</h4>
74
75<p>
76The nested <code>targetfileset</code> element specifies a <a
77href="../CoreTypes/fileset.html">FileSet</a>. All files included in
78this fileset will be compared against all files included in all of the
79<code>srcfileset</code> filesets and <code>sourcefilelist</code>
80filelists, and if any are older, they are all deleted.
81Multiple <code>targetfileset</code> filesets may be specified.
82</p>
83
84<h4>targetfilelist</h4>
85
86<p>
87The nested <code>targetfilelist</code> element specifies a <a
88href="../CoreTypes/filelist.html">FileList</a>. All files included in
89this filelist will be compared against all files included in all of the
90<code>srcfileset</code> filesets and <code>sourcefilelist</code>
91filelists, and if any are older, they are all deleted.
92Multiple <code>targetfilelist</code> filelists may be specified.
93</p>
94
95<h3>Examples</h3>
96<blockquote> <pre>
97 &lt;dependset&gt;
98 &lt;srcfilelist
99 dir = &quot;${dtd.dir}&quot;
100 files = &quot;paper.dtd,common.dtd&quot;/&gt;
101 &lt;srcfilelist
102 dir = &quot;${xsl.dir}&quot;
103 files = &quot;common.xsl&quot;/&gt;
104 &lt;srcfilelist
105 dir = &quot;${basedir}&quot;
106 files = &quot;build.xml&quot;/&gt;
107 &lt;targetfileset
108 dir = &quot;${output.dir}&quot;
109 includes = &quot;**/*.html&quot;/&gt;
110 &lt;/dependset&gt; </pre>
111</blockquote>
112
113<p>
114In this example derived HTML files in the ${output.dir} directory
115will be removed if any are out-of-date with respect to:</p>
116<ol>
117<li>the DTD of their source XML files</li>
118<li>a common DTD (imported by the main DTD)</li>
119<li>a subordinate XSLT stylesheet (imported by the main stylesheet), or</li>
120<li>the buildfile</li>
121</ol>
122
123<p>
124If any of the source files in the above example does not exist, all
125target files will also be removed. To ignore missing source files instead,
126use filesets instead of filelists for the source files.
127</p>
128
129<hr>
130<p align="center">Copyright &copy; 2001,2004 The Apache Software Foundation.
131All rights
132Reserved.</p>
133
134</body>
135</html>
Note: See TracBrowser for help on using the repository browser.