The FileSet Element
The IzPack fileset concept has been adapted from the Apache Ant FileSet core type. Its functionality has been shrunken to the needs of IzPack.
IzPack FileSets are groups of source files. These files can be found in a directory tree starting in a base directory and are matched by patterns taken from a number of Selectors. FileSets can appear as nested elements inside installation descriptors and the ConfigurationInstallerListener to describe groups of source files for their enclosing parent element.
FileSet supports the nested <include>, <includesfile>, <exclude> and <excludesfile> elements.
Selectors are available as nested elements.within the FileSet. If any of the selectors within the FileSet do not select the file, the file is not considered part of the FileSet. This makes FileSets equivalent to an <and> selector container.
Attribute | Description | Required |
---|---|---|
dir | The root of the directory tree of this FileSet | Yes |
includes | Comma- or space-separated list of patterns of files that must be included; all files are included when omitted. | No |
excludes | Comma- or space-separated list of patterns of files that must be excluded; no files (except default excludes) are excluded when omitted | No |
defaultexcludes | Indicates whether default excludes should be used or not (yes | no); default excludes are used when omitted. | No |
casesensitive | Must the include and exclude patterns be treated in a case sensitive way? Defaults to true. | No |
followsymlinks | Shall symbolic links be followed? Defaults to true. See the note below. | No |
Note: All files/directories for which the canonical path is different from its path are considered symbolic links. On Unix systems this usually means the file really is a symbolic links but it may lead to false results on other platforms.
Examples
<fileset dir="${user.dir}/staging" casesensitive="yes"> <include name="*/.java"/> <exclude name="**/Test"/> </fileset>
Groups all files in a given directory that are Java source files and don't have the text Test in their name.
<fileset dir="${user.dir}/staging" casesensitive="yes"> <filename name="**/*.java"/> <not> <filename name="**/*Test*"/> </not> </fileset>