org.apache.maven.plugin.rar
Class RarMojo

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by org.apache.maven.plugin.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: RarMojo.java 1411439 2012-11-19 21:46:22Z olamy $
Author:
Stephane Nicoll

Field Summary
protected  List<String> delimiters
           Set of delimiters for expressions to filter within the resources.
protected  String encoding
           
protected  String escapeString
          Expression preceded with the String won't be interpolated \${foo} will be replaced with ${foo}
protected  boolean escapeWindowsPaths
          Whether to escape backslashes and colons in windows-style paths.
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.
protected  boolean includeEmptyDirs
          Copy any empty directories included in the Resources.
protected  org.apache.maven.shared.filtering.MavenResourcesFiltering mavenResourcesFiltering
           
protected  List<String> nonFilteredFileExtensions
          Additional file extensions to not apply filtering (already defined are : jpg, jpeg, gif, bmp, png)
static String RA_XML_URI
           
protected  List<RarResource> rarResources
          extra resource to include in rar archive
protected  org.apache.maven.execution.MavenSession session
           
protected  boolean useDefaultDelimiters
           
protected  boolean warnOnMissingRaXml
          Whether or not warn if the ra.xml file is missing.
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
RarMojo()
           
 
Method Summary
 void execute()
           
protected  File getBuildDir()
           
 
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 Detail

RA_XML_URI

public static final String RA_XML_URI
See Also:
Constant Field Values

mavenResourcesFiltering

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

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 List<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="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
Constructor Detail

RarMojo

public RarMojo()
Method Detail

execute

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

getBuildDir

protected File getBuildDir()


Copyright © 2004-2012 The Apache Software Foundation. All Rights Reserved.