[14627] | 1 | <html>
|
---|
| 2 |
|
---|
| 3 | <head>
|
---|
| 4 | <meta http-equiv="Content-Language" content="en-us">
|
---|
| 5 | <title>DirSet Type</title>
|
---|
| 6 | <link rel="stylesheet" type="text/css" href="../stylesheets/antmanual.css">
|
---|
| 7 | </head>
|
---|
| 8 |
|
---|
| 9 | <body>
|
---|
| 10 |
|
---|
| 11 | <h2><a name="dirset">DirSet</a></h2>
|
---|
| 12 | <p>DirSets are groups of directories. These directories can be found in a
|
---|
| 13 | directory tree starting in a base directory and are matched by
|
---|
| 14 | patterns taken from a number of <a
|
---|
| 15 | href="patternset.html">PatternSets</a>. DirSets can appear inside tasks
|
---|
| 16 | that support this feature or at the same level as <code>target</code>
|
---|
| 17 | (i.e., as children of <code><project></code>).</p>
|
---|
| 18 | <p>PatternSets can be specified as nested
|
---|
| 19 | <code><patternset></code> elements. In addition, DirSet holds
|
---|
| 20 | an implicit PatternSet and supports the nested
|
---|
| 21 | <code><include></code>, <code><includesfile></code>,
|
---|
| 22 | <code><exclude></code> and <code><excludesfile></code>
|
---|
| 23 | elements of <code><patternset></code> directly, as well as
|
---|
| 24 | <code><patternset></code>'s attributes.</p>
|
---|
| 25 | <table border="1" cellpadding="2" cellspacing="0">
|
---|
| 26 | <tr>
|
---|
| 27 | <td valign="top"><b>Attribute</b></td>
|
---|
| 28 | <td valign="top"><b>Description</b></td>
|
---|
| 29 | <td align="center" valign="top"><b>Required</b></td>
|
---|
| 30 | </tr>
|
---|
| 31 | <tr>
|
---|
| 32 | <td valign="top">dir</td>
|
---|
| 33 | <td valign="top">The root of the directory tree of this DirSet.</td>
|
---|
| 34 | <td valign="top" align="center">Yes</td>
|
---|
| 35 | </tr>
|
---|
| 36 | <tr>
|
---|
| 37 | <td valign="top">includes</td>
|
---|
| 38 | <td valign="top">A comma- or space-separated list of patterns of directories that
|
---|
| 39 | must be included; all directories are included when omitted.</td>
|
---|
| 40 | <td valign="top" align="center">No</td>
|
---|
| 41 | </tr>
|
---|
| 42 | <tr>
|
---|
| 43 | <td valign="top">includesfile</td>
|
---|
| 44 | <td valign="top">The name of a file; each line of this file is
|
---|
| 45 | taken to be an include pattern.</td>
|
---|
| 46 | <td valign="top" align="center">No</td>
|
---|
| 47 | </tr>
|
---|
| 48 | <tr>
|
---|
| 49 | <td valign="top">excludes</td>
|
---|
| 50 | <td valign="top">A comma- or space-separated list of patterns of directories that
|
---|
| 51 | must be excluded; no directories are excluded when omitted.</td>
|
---|
| 52 | <td valign="top" align="center">No</td>
|
---|
| 53 | </tr>
|
---|
| 54 | <tr>
|
---|
| 55 | <td valign="top">excludesfile</td>
|
---|
| 56 | <td valign="top">The name of a file; each line of this file is
|
---|
| 57 | taken to be an exclude pattern.</td>
|
---|
| 58 | <td valign="top" align="center">No</td>
|
---|
| 59 | </tr>
|
---|
| 60 | <tr>
|
---|
| 61 | <td valign="top">casesensitive</td>
|
---|
| 62 | <td valign="top">Specifies whether case-sensitivty should be applied
|
---|
| 63 | (<code>true</code>|<code>yes</code>|<code>on</code> or
|
---|
| 64 | <code>false</code>|<code>no</code>|<code>off</code>).</td>
|
---|
| 65 | <td valign="top" align="center">No; defaults to true.</td>
|
---|
| 66 | </tr>
|
---|
| 67 | <tr>
|
---|
| 68 | <td valign="top">followsymlinks</td>
|
---|
| 69 | <td valign="top">Shall symbolic links be followed? Defaults to
|
---|
| 70 | true. See <a href="fileset.html#symlink">fileset's documentation</a>.</td>
|
---|
| 71 | <td valign="top" align="center">No</td>
|
---|
| 72 | </tr>
|
---|
| 73 | </table>
|
---|
| 74 |
|
---|
| 75 | <h4>Examples</h4>
|
---|
| 76 | <blockquote><pre>
|
---|
| 77 | <dirset dir="${build.dir}">
|
---|
| 78 | <include name="apps/**/classes"/>
|
---|
| 79 | <exclude name="apps/**/*Test*"/>
|
---|
| 80 | </dirset>
|
---|
| 81 | </pre></blockquote>
|
---|
| 82 | <p>Groups all directories named <code>classes</code> found under the
|
---|
| 83 | <code>apps</code> subdirectory of <code>${build.dir}</code>, except those
|
---|
| 84 | that have the text <code>Test</code> in their name.</p>
|
---|
| 85 | <blockquote><pre>
|
---|
| 86 | <dirset dir="${build.dir}">
|
---|
| 87 | <patternset id="non.test.classes">
|
---|
| 88 | <include name="apps/**/classes"/>
|
---|
| 89 | <exclude name="apps/**/*Test*"/>
|
---|
| 90 | </patternset>
|
---|
| 91 | </dirset>
|
---|
| 92 | </pre></blockquote>
|
---|
| 93 | <p>Groups the same directories as the above example, but also establishes
|
---|
| 94 | a PatternSet that can be referenced in other
|
---|
| 95 | <code><dirset></code> elements, rooted at a different directory.</p>
|
---|
| 96 | <blockquote><pre>
|
---|
| 97 | <dirset dir="${debug_build.dir}">
|
---|
| 98 | <patternset refid="non.test.classes"/>
|
---|
| 99 | </dirset>
|
---|
| 100 | </pre></blockquote>
|
---|
| 101 | <p>Groups all directories in directory <code>${debug_build.dir}</code>,
|
---|
| 102 | using the same patterns as the above example.</p>
|
---|
| 103 |
|
---|
| 104 | <hr>
|
---|
| 105 | <p align="center">Copyright © 2002,2004 The Apache Software Foundation.
|
---|
| 106 | All rights Reserved.</p>
|
---|
| 107 |
|
---|
| 108 | </body>
|
---|
| 109 | </html>
|
---|
| 110 |
|
---|