Class Exclude
java.lang.Object
org.apache.maven.buildcache.xml.config.Exclude
- All Implemented Interfaces:
Serializable
A file or a directory path to exclude from the checksum computation. Relative path are relative to each module basedir.
When referring to a directory, additional properties help adjust the scope of the exclusion:- glob - only entries matching this glob pattern are excluded
- entryType - type of entries excluded from the scan
- matcherType - entry property on which the glob matching is applied
By default, targeting a directory excludes everything underneath it.
Examples :<exclude>src/main/doc</exclude>: excludes everything under : ${project.basedir}/src/main/doc<exclude>src/main/java/package-info.java</exclude>: excludes this file : ${project.basedir}/src/main/java/package-info.java<exclude glob="package-info.java"></exclude>: excludes all the files named package-info.java<exclude glob="src/main/resources/**.txt" entryType="FILE" matcherType="PATH" ></exclude>: excludes all the text files located under the "resources" folder
Exclude elements can also be added per project with the use of maven properties.
- Version:
- $Revision$ $Date$
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet type of entries filtered.getGlob()Get entries are filtered by matching this glob (see matcherType property).Get the entry property matched for exclusion.getValue()Get an absolute or relative path to a filename or a directory.voidsetEntryType(String entryType) Set type of entries filtered.voidSet entries are filtered by matching this glob (see matcherType property).voidsetMatcherType(String matcherType) Set the entry property matched for exclusion.voidSet an absolute or relative path to a filename or a directory.
-
Constructor Details
-
Exclude
public Exclude()
-
-
Method Details
-
getEntryType
Get type of entries filtered. One of FILE, DIRECTORY, ALL. Excluding a directory excludes its subfiles and subdirectories.- Returns:
- String
-
getGlob
Get entries are filtered by matching this glob (see matcherType property).- Returns:
- String
-
getMatcherType
Get the entry property matched for exclusion. One of FILENAME, PATH. For a path, if the exclusion value is empty or a relative path, matching is done relatively to the project folder.- Returns:
- String
-
getValue
Get an absolute or relative path to a filename or a directory. In the later case, the exclusion is applied starting from this directory (can be beneficial in term of performances). If empty, the glob is applied on every file listed as a potential part of the checksum.- Returns:
- String
-
setEntryType
Set type of entries filtered. One of FILE, DIRECTORY, ALL. Excluding a directory excludes its subfiles and subdirectories.- Parameters:
entryType- a entryType object.
-
setGlob
Set entries are filtered by matching this glob (see matcherType property).- Parameters:
glob- a glob object.
-
setMatcherType
Set the entry property matched for exclusion. One of FILENAME, PATH. For a path, if the exclusion value is empty or a relative path, matching is done relatively to the project folder.- Parameters:
matcherType- a matcherType object.
-
setValue
Set an absolute or relative path to a filename or a directory. In the later case, the exclusion is applied starting from this directory (can be beneficial in term of performances). If empty, the glob is applied on every file listed as a potential part of the checksum.- Parameters:
value- a value object.
-