|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173 |
- <!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- -->
- <html>
-
- <head>
- <meta http-equiv="Content-Language" content="en-us">
- <link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
- <title>MultiRootFileSet Type</title>
- </head>
-
- <body>
-
- <h2><a name="multirootfileset">MultiRootFileSet</a></h2>
-
- <p><em>Since Ant 1.9.4</em></p>
-
- <p>A MultiRootFileSet is a group of files or directories. These files
- or directories can be found in a directory forrest starting with a set
- of base directories and are matched by patterns taken from a number of
- <a href="patternset.html">PatternSets</a> and <a
- href="selectors.html">Selectors</a>.</p>
-
- <p>MultiRootFileSet acts as a union of <a
- href="fileset.html">FileSets</a> and <a href="dirset.html">DirSets</a>
- that share the same patterns and selectors.</p>
-
- <p>MultiRootFileSet supports all attributes and nested elements of
- FileSet and DirSet except for the "dir" attribute.</p>
-
- <table border="1" cellpadding="2" cellspacing="0">
- <tr>
- <td valign="top"><b>Attribute</b></td>
- <td valign="top"><b>Description</b></td>
- <td align="center" valign="top"><b>Required</b></td>
- </tr>
- <tr>
- <td valign="top">basedirs</td>
- <td valign="top">Comma separated list of directories that build
- the roots of the MultiRootFileSet.</td>
- <td valign="top" align="center">No</td>
- </tr>
- <tr>
- <td valign="top">cache</td>
- <td valign="top">Whether to cache results; disabling
- may seriously impact performance</td>
- <td valign="top" align="center">No, default <i>true</i></td>
- </tr>
- <tr>
- <td valign="top">type</td>
- <td valign="top">The type of file system entities which will be
- included in this set.
- Acceptable values are:
- <ul>
- <li>file - regular files</li>
- <li>dir - directories</li>
- <li>both - regular files and directories</li>
- </ul>
- </td>
- <td valign="top" align="center">No, defaults to <i>file</i></td>
- </tr>
- <tr>
- <td valign="top">includes</td>
- <td valign="top">A comma- or space-separated list of patterns of directories that
- must be included; all directories are included when omitted.</td>
- <td valign="top" align="center">No</td>
- </tr>
- <tr>
- <td valign="top">includesfile</td>
- <td valign="top">The name of a file; each line of this file is
- taken to be an include pattern.</td>
- <td valign="top" align="center">No</td>
- </tr>
- <tr>
- <td valign="top">excludes</td>
- <td valign="top">A comma- or space-separated list of patterns of directories that
- must be excluded; no directories are excluded when omitted.</td>
- <td valign="top" align="center">No</td>
- </tr>
- <tr>
- <td valign="top">excludesfile</td>
- <td valign="top">The name of a file; each line of this file is
- taken to be an exclude pattern.</td>
- <td valign="top" align="center">No</td>
- </tr>
- <tr>
- <td valign="top">casesensitive</td>
- <td valign="top">Specifies whether case-sensitivity should be applied
- (<code>true</code>|<code>yes</code>|<code>on</code> or
- <code>false</code>|<code>no</code>|<code>off</code>).</td>
- <td valign="top" align="center">No; defaults to true.</td>
- </tr>
- <tr>
- <td valign="top">followsymlinks</td>
- <td valign="top">Shall symbolic links be followed? Defaults to
- true. See <a href="fileset.html#symlink">fileset's documentation</a>.</td>
- <td valign="top" align="center">No</td>
- </tr>
- <tr>
- <td valign="top">erroronmissingdir</td>
- <td valign="top">
- Specify what happens if one of the base directories does not exist.
- If true a build error will happen, if false, the subtree
- will be ignored/empty.
- Defaults to true.
- </td>
- <td valign="top" align="center">No</td>
- </tr>
- </table>
-
- <h3>Parameters specified as nested elements</h3>
-
- <p>PatternSets can be specified as nested
- <code><patternset></code> elements. In addition, MultiRootFileSet holds
- an implicit PatternSet and supports the nested
- <code><include></code>, <code><includesfile></code>,
- <code><exclude></code> and <code><excludesfile></code>
- elements of <code><patternset></code> directly, as well as
- <code><patternset></code>'s attributes.</p>
-
- <p>Selectors are available as nested elements within the
- MultiRootFileSet. If any of the selectors within the MultiRootFileSet
- do not select the file or directory, it is not considered part of the
- MultiRootFileSet. This makes a MultiRootFileSet equivalent to
- an <code><and></code> selector container.</p>
-
- <p>In addition basedirs for the MultiRootFileSet can be specified as
- nested <code>basedir</code> elements that have a
- single <code>file</code> attribute.</p>
-
-
- <h4>Examples</h4>
-
- <blockquote><pre>
- <multirootfileset basedirs="${build.dir},${other.project.dir}">
- <include name="apps/**/classes"/>
- <exclude name="apps/**/*Test*"/>
- </multirootfileset>
- </pre></blockquote>
- <p>Groups all files inside <code>classes</code> found under the
- <code>apps</code> subdirectory of <code>${build.dir}</code> or
- <code>${other.project.dir}</code>, except those that have the text
- <code>Test</code> in their name.</p>
-
- <blockquote><pre>
- <multirootfileset>
- <basedir file="${build.dir}"/>
- <basedir file="${other.project.dir}"
- <include name="apps/**/classes"/>
- <exclude name="apps/**/*Test*"/>
- </multirootfileset>
- </pre></blockquote>
- <p>Is equivalent to the first example but used
- nested <code>basedir</code> elements. The nested elements and
- the <code>basedirs</code> attribute can be used at the same time and
- the will be merged.</p>
-
- </body>
- </html>
-
|