

The directory where the files will be searched for, which is also the directory where the project's files will be generated. They can be non-packaged, which means that the selected files will be generated/copied without that prepend. They can be non-filtered, which means the selected files will be copied without modification.įilesets can be packaged, which means the selected files will be generated/copied in a directory structure that is prepended by the package property. Attributeįilesets can be filtered, which means the selected files will be used as _ property_ pattern, it is replaced with corresponding property value. The below FileSets all select the files in directory $ that are Java source files without "Test" in their name.įileSets can appear as children of the project element or inside tasks that support this feature.A fileset defines the way the project's files located in the jar file are used by the Archetype Plugin to generate a project.

** : is used to match zero or more directories.* : is used to match zero or more characters.Wildcards are used by ant to specify groups of files that have a pattern to their names. This makes FileSets equivalent to an selector container. If any selector within the FileSet do not select a given file, that file is not considered part of the FileSet.

Then the FileSet's enclosed pattern elements, both named (PatternSets) and selected by wildcards (Selectors), choose the files and folders within the base tree. These files can be found in a directory tree starting in a base directory and are matched by patterns taken from a number of PatternSets and Selectors.įileSet identifies the base directory tree with its dir attribute. Apache Ant offers built-in support for J2EE development like EJB compilation and packaging. Apache Ant is easily extensible using Java and other programming languages. FileSets are ant's way of creating groups of files to do work on. The exclude or excludesfile attribute is used to specify the files you want to have excluded. Apache Ant is a cross-platform tool which allows you to handle Java classpath and file directory structure in an affordable manner.
