The compression incorporated with many archiving formats can offer an advantage here. You want to enable potential developers to get started quickly, without checking out hundreds of 10-megabyte files first. This project contains a large number of sizable files that haven't changed since the day they were added, in the early stages of the project's lifetime. In this example, let's examine what happens if you have a large project in source control. Example: Bundle project sources for a developer-quickstart pack On the other hand, what if you wanted to include Subversion metadata directories? Starting with version 2.2, the assembly plugin offers the useDefaultExcludes option on all fileSet elements, in order to accommodate this use case. By default, the assembly plugin will exclude metadata files for most common source-control systems from the fileSets specified in the descriptor. Such metadata can increase the size of the resulting assembly vastly. Including Subversion Metadata Directories in a FileSetįor most use cases, it's important to avoid adding metadata files from your source-control system, such as Subversion's. In this example, we'll configure a dependencySet so it only includes those war dependencies. So, a wildcard pattern that matches any artifact of type 'war' might be specified as *:war.Įxample: Include all dependencies of type 'war'
#APACHE ANT FILESET FULL#
However, explicitly specifying the full artifact ID (consisting of groupId, artifactId, version, type, and classifier) for each artifact to be included or excluded can lead to very a verbose descriptor. This can be a good thing, since you don't have to know the artifact's filename in the local repository. When using dependencySet or moduleSet, the and sections actually apply to artifacts, not filenames. Advanced Artifact-Matching in includes and excludes Note that this behaviour was slightly different in earlier versions of the assembly plugin. If you need to "overwrite" a file included by a previous set, the only way to do this is to exclude that file from the earlier set. The order of the phases is as follows: 1) FileItem 2) FileSets 3) ModuleSet 4) DepenedencySet and 5) Repository elements.Įlements of the same type will be processed in the order they appear in the descriptors. The filtering is done solely based on name inside the archive, so the same source file can be added under different output names.
#APACHE ANT FILESET ARCHIVE#
If two or more elements (e.g., file, fileSet) select different sources for the same file for archiving, only one of the source files will be archived.Īs per version 2.5.2 of the assembly plugin, the first phase to add the file to the archive "wins". Advanced Assembly-Descriptor Topics Quick Note on All includes and excludes PatternsĮxcludes take priority over includes.