Class RarMojo

java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.apache.maven.plugins.rar.RarMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

@Mojo(name="rar", threadSafe=true, defaultPhase=PACKAGE, requiresDependencyResolution=TEST) public class RarMojo extends org.apache.maven.plugin.AbstractMojo
Builds J2EE Resource Adapter Archive (RAR) files.
Version:
$Id$
Author:
Stephane Nicoll
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    Set of delimiters for expressions to filter within the resources.
    protected String
     
    protected String
    Expression preceded with the String won't be interpolated \${foo} will be replaced with ${foo}
    protected boolean
    Whether to escape backslashes and colons in windows-style paths.
    protected List<String>
    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.
    protected boolean
    Copy any empty directories included in the Resources.
    protected org.apache.maven.shared.filtering.MavenResourcesFiltering
     
    protected List<String>
    Additional file extensions to not apply filtering (already defined are : jpg, jpeg, gif, bmp, png)
    protected List<RarResource>
    extra resource to include in rar archive
    protected org.apache.maven.execution.MavenSession
     
    protected boolean
     
    protected boolean
    Whether or not warn if the ra.xml file is missing.

    Fields inherited from interface org.apache.maven.plugin.Mojo

    ROLE
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    protected File
     
    protected static File
    getRarFile(File basedir, String finalName, String classifier)
     

    Methods inherited from class org.apache.maven.plugin.AbstractMojo

    getLog, getPluginContext, setLog, setPluginContext

    Methods inherited from class java.lang.Object

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

    • session

      @Parameter(defaultValue="${session}", required=true, readonly=true) protected org.apache.maven.execution.MavenSession session
      Since:
      2.3
    • encoding

      @Parameter(property="encoding", defaultValue="${project.build.sourceEncoding}") protected String encoding
      Since:
      2.3
    • escapeWindowsPaths

      @Parameter(property="maven.resources.escapeWindowsPaths", defaultValue="true") protected boolean escapeWindowsPaths
      Whether to escape backslashes and colons in windows-style paths.
      Since:
      2.3
    • escapeString

      @Parameter(property="maven.resources.escapeString") protected String escapeString
      Expression preceded with the String won't be interpolated \${foo} will be replaced with ${foo}
      Since:
      2.3
    • includeEmptyDirs

      @Parameter(property="maven.resources.includeEmptyDirs", defaultValue="false") protected boolean includeEmptyDirs
      Copy any empty directories included in the Resources.
      Since:
      2.3
    • useDefaultDelimiters

      @Parameter(defaultValue="true") protected boolean useDefaultDelimiters
      Since:
      2.3
    • delimiters

      @Parameter protected LinkedHashSet<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).

      Since:
      2.3
    • filters

      @Parameter protected List<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.

      Since:
      2.3
    • nonFilteredFileExtensions

      @Parameter protected List<String> nonFilteredFileExtensions
      Additional file extensions to not apply filtering (already defined are : jpg, jpeg, gif, bmp, png)
      Since:
      2.3
    • rarResources

      @Parameter protected List<RarResource> rarResources
      extra resource to include in rar archive
      Since:
      2.3
    • warnOnMissingRaXml

      @Parameter(property="maven.rar.warnOnMissingRaXml", defaultValue="true") protected boolean warnOnMissingRaXml
      Whether or not warn if the ra.xml file is missing. Set to false if you want you RAR built without a ra.xml file. This may be useful if you are building against JCA 1.6 or later.
      Since:
      2.3
    • mavenResourcesFiltering

      @Component(role=org.apache.maven.shared.filtering.MavenResourcesFiltering.class, hint="default") protected org.apache.maven.shared.filtering.MavenResourcesFiltering mavenResourcesFiltering
      Since:
      2.3
  • Constructor Details

    • RarMojo

      public RarMojo()
  • Method Details

    • execute

      public void execute() throws org.apache.maven.plugin.MojoExecutionException
      Throws:
      org.apache.maven.plugin.MojoExecutionException
    • getBuildDir

      protected File getBuildDir()
      Returns:
      The buildDir.
    • getRarFile

      protected static File getRarFile(File basedir, String finalName, String classifier)
      Parameters:
      basedir - The basedir.
      finalName - The finalName.
      classifier - The classifier.
      Returns:
      the resulting file which contains classifier.