Class PackagingResources

java.lang.Object
net.agilhard.maven.plugins.jpacktool.base.mojo.PackagingResources

public class PackagingResources
extends java.lang.Object
  • Field Summary

    Fields 
    Modifier and Type Field Description
    boolean addDefaultExcludes
    By default files like .gitignore, .cvsignore etc.
    java.util.List<java.lang.String> buildFilters
    The 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> delimiters
    Set of delimiters for expressions to filter within the resources.
    java.lang.String encoding
    The character encoding scheme to be applied when filtering resources.
    java.lang.String escapeString
    Expressions preceded with this string won't be interpolated.
    boolean escapeWindowsPaths
    Whether to escape backslashes and colons in windows-style paths.
    boolean fileNameFiltering
    Support filtering of filenames folders etc.
    java.util.List<java.lang.String> filters
    The 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.
    boolean includeEmptyDirs
    Copy any empty directories included in the Resources.
    java.util.List<java.lang.String> mavenFilteringHints
    List of plexus components hint which implements MavenResourcesFiltering.filterResources(MavenResourcesExecution).
    java.util.List<java.lang.String> nonFilteredFileExtensions
    Additional file extensions to not apply filtering (already defined are : jpg, jpeg, gif, bmp, png)
    java.io.File outputDirectory
    The output directory into which to copy the resources.
    boolean overwrite
    Overwrite existing files even if the destination files are newer.
    java.util.List<org.apache.maven.model.Resource> resources
    The list of resources we want to transfer.
    boolean skip
    You can skip the execution of the plugin if you need to.
    boolean supportMultiLineFiltering
    stop searching endToken at the end of line
    boolean useBuildFilters
    If false, don't use the filters specified in the build/filters section of the POM when processing resources in this mojo execution.
    boolean useDefaultDelimiters
    Use default delimiters in addition to custom delimiters, if any.
  • Constructor Summary

    Constructors 
    Constructor Description
    PackagingResources()  
  • Method Summary

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • encoding

      @Parameter(defaultValue="${project.build.sourceEncoding}") public java.lang.String encoding
      The character encoding scheme to be applied when filtering resources.
    • outputDirectory

      @Parameter(defaultValue="${project.build.outputDirectory}", required=true) public java.io.File outputDirectory
      The 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> resources
      The list of resources we want to transfer.
    • buildFilters

      @Parameter(defaultValue="${project.build.filters}", readonly=true) public java.util.List<java.lang.String> buildFilters
      The 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> filters

      The 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-resources and default-testResources to supply different configurations for the two different types of resources. By supplying extraFilters configurations, you can separate which filters are used for which type of resource.

    • useBuildFilters

      @Parameter(defaultValue="true") public boolean useBuildFilters
      If 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 escapeString
      Expressions 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 overwrite
      Overwrite existing files even if the destination files are newer.
    • includeEmptyDirs

      @Parameter(defaultValue="false") public boolean includeEmptyDirs
      Copy any empty directories included in the Resources.
    • nonFilteredFileExtensions

      @Parameter public java.util.List<java.lang.String> nonFilteredFileExtensions
      Additional file extensions to not apply filtering (already defined are : jpg, jpeg, gif, bmp, png)
    • escapeWindowsPaths

      @Parameter(defaultValue="true") public boolean escapeWindowsPaths
      Whether to escape backslashes and colons in windows-style paths.
    • delimiters

      @Parameter public java.util.LinkedHashSet<java.lang.String> delimiters

      Set 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 useDefaultDelimiters
      Use default delimiters in addition to custom delimiters, if any.
    • addDefaultExcludes

      @Parameter(defaultValue="true") public boolean addDefaultExcludes
      By default files like .gitignore, .cvsignore etc. are excluded which means they will not being copied. If you need them for a particular reason you can do that by settings this to false. 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> mavenFilteringHints

      List of plexus components hint which implements MavenResourcesFiltering.filterResources(MavenResourcesExecution). They will be executed after the resources copying/filtering.

    • supportMultiLineFiltering

      @Parameter(defaultValue="false") public boolean supportMultiLineFiltering
      stop searching endToken at the end of line
    • fileNameFiltering

      @Parameter(defaultValue="false") public boolean fileNameFiltering
      Support filtering of filenames folders etc.
    • @Parameter(property="maven.resources.skip", defaultValue="false") public boolean skip
      You can skip the execution of the plugin if you need to. Its use is NOT RECOMMENDED, but quite convenient on occasion.
  • Constructor Details