Class PackagingResources
public class PackagingResources
extends java.lang.Object
-
Field Summary
Fields Modifier and Type Field Description booleanaddDefaultExcludesBy default files like.gitignore,.cvsignoreetc.java.util.List<java.lang.String>buildFiltersThe list of additional filter properties files to be used along with System and project properties, which would be used for the filtering.java.util.LinkedHashSet<java.lang.String>delimitersSet of delimiters for expressions to filter within the resources.java.lang.StringencodingThe character encoding scheme to be applied when filtering resources.java.lang.StringescapeStringExpressions preceded with this string won't be interpolated.booleanescapeWindowsPathsWhether to escape backslashes and colons in windows-style paths.booleanfileNameFilteringSupport filtering of filenames folders etc.java.util.List<java.lang.String>filtersThe list of extra filter properties files to be used along with System properties, project properties, and filter properties files specified in the POM build/filters section, which should be used for the filtering during the current mojo execution.booleanincludeEmptyDirsCopy any empty directories included in the Resources.java.util.List<java.lang.String>mavenFilteringHintsList of plexus components hint which implementsMavenResourcesFiltering.filterResources(MavenResourcesExecution).java.util.List<java.lang.String>nonFilteredFileExtensionsAdditional file extensions to not apply filtering (already defined are : jpg, jpeg, gif, bmp, png)java.io.FileoutputDirectoryThe output directory into which to copy the resources.booleanoverwriteOverwrite existing files even if the destination files are newer.java.util.List<org.apache.maven.model.Resource>resourcesThe list of resources we want to transfer.booleanskipYou can skip the execution of the plugin if you need to.booleansupportMultiLineFilteringstop searching endToken at the end of linebooleanuseBuildFiltersIf false, don't use the filters specified in the build/filters section of the POM when processing resources in this mojo execution.booleanuseDefaultDelimitersUse default delimiters in addition to custom delimiters, if any. -
Constructor Summary
Constructors Constructor Description PackagingResources() -
Method Summary
-
Field Details
-
encoding
@Parameter(defaultValue="${project.build.sourceEncoding}") public java.lang.String encodingThe character encoding scheme to be applied when filtering resources. -
outputDirectory
@Parameter(defaultValue="${project.build.outputDirectory}", required=true) public java.io.File outputDirectoryThe output directory into which to copy the resources. -
resources
@Parameter(defaultValue="${project.resources}", required=true, readonly=true) public java.util.List<org.apache.maven.model.Resource> resourcesThe list of resources we want to transfer. -
buildFilters
@Parameter(defaultValue="${project.build.filters}", readonly=true) public java.util.List<java.lang.String> buildFiltersThe list of additional filter properties files to be used along with System and project properties, which would be used for the filtering. -
filters
@Parameter public java.util.List<java.lang.String> filtersThe list of extra filter properties files to be used along with System properties, project properties, and filter properties files specified in the POM build/filters section, which should be used for the filtering during the current mojo execution.
Normally, these will be configured from a plugin's execution section, to provide a different set of filters for a particular execution. For instance, starting in Maven 2.2.0, you have the option of configuring executions with the id's
default-resourcesanddefault-testResourcesto supply different configurations for the two different types of resources. By supplyingextraFiltersconfigurations, you can separate which filters are used for which type of resource. -
useBuildFilters
@Parameter(defaultValue="true") public boolean useBuildFiltersIf false, don't use the filters specified in the build/filters section of the POM when processing resources in this mojo execution. -
escapeString
@Parameter public java.lang.String escapeStringExpressions preceded with this string won't be interpolated. Anything else preceded with this string will be passed through unchanged. For example\${foo}will be replaced with${foo}but\\${foo}will be replaced with\\value of foo, if this parameter has been set to the backslash. -
overwrite
@Parameter(defaultValue="false") public boolean overwriteOverwrite existing files even if the destination files are newer. -
includeEmptyDirs
@Parameter(defaultValue="false") public boolean includeEmptyDirsCopy any empty directories included in the Resources. -
nonFilteredFileExtensions
@Parameter public java.util.List<java.lang.String> nonFilteredFileExtensionsAdditional file extensions to not apply filtering (already defined are : jpg, jpeg, gif, bmp, png) -
escapeWindowsPaths
@Parameter(defaultValue="true") public boolean escapeWindowsPathsWhether to escape backslashes and colons in windows-style paths. -
delimiters
@Parameter public java.util.LinkedHashSet<java.lang.String> delimitersSet of delimiters for expressions to filter within the resources. These delimiters are specified in the form
beginToken*endToken. If no*is given, the delimiter is assumed to be the same for start and end.So, the default filtering delimiters might be specified as:
<delimiters> <delimiter>${*}</delimiter> <delimiter>@</delimiter> </delimiters>Since the
@delimiter is the same on both ends, we don't need to specify@*@(though we can). -
useDefaultDelimiters
@Parameter(defaultValue="true") public boolean useDefaultDelimitersUse default delimiters in addition to custom delimiters, if any. -
addDefaultExcludes
@Parameter(defaultValue="true") public boolean addDefaultExcludesBy default files like.gitignore,.cvsignoreetc. are excluded which means they will not being copied. If you need them for a particular reason you can do that by settings this tofalse. This means all files like the following will be copied.- Misc: **/*~, **/#*#, **/.#*, **/%*%, **/._*
- CVS: **/CVS, **/CVS/**, **/.cvsignore
- RCS: **/RCS, **/RCS/**
- SCCS: **/SCCS, **/SCCS/**
- VSSercer: **/vssver.scc
- MKS: **/project.pj
- SVN: **/.svn, **/.svn/**
- GNU: **/.arch-ids, **/.arch-ids/**
- Bazaar: **/.bzr, **/.bzr/**
- SurroundSCM: **/.MySCMServerInfo
- Mac: **/.DS_Store
- Serena Dimension: **/.metadata, **/.metadata/**
- Mercurial: **/.hg, **/.hg/**
- GIT: **/.git, **/.gitignore, **/.gitattributes, **/.git/**
- Bitkeeper: **/BitKeeper, **/BitKeeper/**, **/ChangeSet, **/ChangeSet/**
- Darcs: **/_darcs, **/_darcs/**, **/.darcsrepo, **/.darcsrepo/****/-darcs-backup*, **/.darcs-temp-mail
-
mavenFilteringHints
@Parameter public java.util.List<java.lang.String> mavenFilteringHintsList of plexus components hint which implements
MavenResourcesFiltering.filterResources(MavenResourcesExecution). They will be executed after the resources copying/filtering. -
supportMultiLineFiltering
@Parameter(defaultValue="false") public boolean supportMultiLineFilteringstop searching endToken at the end of line -
fileNameFiltering
@Parameter(defaultValue="false") public boolean fileNameFilteringSupport filtering of filenames folders etc. -
skip
@Parameter(property="maven.resources.skip", defaultValue="false") public boolean skipYou can skip the execution of the plugin if you need to. Its use is NOT RECOMMENDED, but quite convenient on occasion.
-
-
Constructor Details
-
PackagingResources
public PackagingResources()
-