Class Resource
java.lang.Object
org.apache.maven.shared.filtering.Resource
- Since:
- 2.3
- Author:
- Olivier Lamy
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddExclude(String exclude) voidaddInclude(String include) voidaddNonFilteredFile(String nonFilteredFile) Adds a single Ant-style glob pattern to the list of non-filtered files.Returns the change detection strategy to apply when copying files from this resource.Returns the per-resource input encoding override.Returns the list of Ant-style glob patterns that should be copied as-is (without filtering), even when this resource has<filtering>true</filtering>.Returns the per-resource output encoding override.booleanvoidsetChangeDetection(ChangeDetection changeDetection) Sets the change detection strategy to apply when copying files from this resource.voidsetDirectory(String directory) voidsetEncoding(String encoding) Sets the per-resource input encoding override.voidsetExcludes(List<String> excludes) voidsetFiltering(boolean filtering) voidsetIncludes(List<String> includes) voidsetMergeId(String mergeId) voidsetNonFilteredFiles(List<String> nonFilteredFiles) Sets the list of Ant-style glob patterns for files that should be copied without filtering.voidsetOutputEncoding(String outputEncoding) Sets the per-resource output encoding override.voidsetTargetPath(String targetPath)
-
Constructor Details
-
Resource
public Resource()
-
-
Method Details
-
getIncludes
-
setIncludes
-
getExcludes
-
setExcludes
-
getNonFilteredFiles
Returns the list of Ant-style glob patterns that should be copied as-is (without filtering), even when this resource has<filtering>true</filtering>. Patterns are matched against the relative file path within the resource directory.- Returns:
- the list of non-filtered file glob patterns (never
null, may be empty) - Since:
- 3.4.0
-
setNonFilteredFiles
-
addNonFilteredFile
Adds a single Ant-style glob pattern to the list of non-filtered files.- Parameters:
nonFilteredFile- the glob pattern to add- Since:
- 3.4.0
-
getDirectory
-
setDirectory
-
getTargetPath
-
setTargetPath
-
isFiltering
public boolean isFiltering() -
setFiltering
public void setFiltering(boolean filtering) -
getMergeId
-
setMergeId
-
getChangeDetection
Returns the change detection strategy to apply when copying files from this resource. When set, this overrides the request-levelAbstractMavenFilteringRequest.getChangeDetection()for files belonging to this resource.- Returns:
- the per-resource change detection strategy, or
nullif not set (falls back to the request level) - Since:
- 4.0.0-beta-2
-
getEncoding
Returns the per-resource input encoding override. When non-null, overrides the globalencodingfor reading this resource's files.- Returns:
- the encoding override, or
nullif not set - Since:
- 4.0.0-beta-3
-
setEncoding
Sets the per-resource input encoding override.- Parameters:
encoding- the encoding override, ornullto use the global encoding- Since:
- 4.0.0-beta-3
-
getOutputEncoding
Returns the per-resource output encoding override. When non-null, overrides the globaloutputEncodingfor writing this resource's files. Setting this enables encoding conversion for the resource (e.g. reading ISO-8859-1 sources and writing UTF-8 output) without affecting other resources.- Returns:
- the output encoding override, or
nullif not set - Since:
- 4.0.0-beta-3
-
setOutputEncoding
Sets the per-resource output encoding override.- Parameters:
outputEncoding- the output encoding override, ornullto use the global output encoding- Since:
- 4.0.0-beta-3
-
addInclude
-
addExclude
-