org.apache.maven.plugin.ear
Class EarMojo

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by org.apache.maven.plugin.ear.AbstractEarMojo
          extended by org.apache.maven.plugin.ear.EarMojo
All Implemented Interfaces:
ContextEnabled, Mojo

@Mojo(name="ear",
      defaultPhase=PACKAGE,
      threadSafe=true,
      requiresDependencyResolution=TEST)
public class EarMojo
extends AbstractEarMojo

Builds J2EE Enterprise Archive (EAR) files.

Version:
$Id: EarMojo.java 1359710 2012-07-10 14:53:53Z tchemit $
Author:
Stephane Nicoll

Field Summary
protected  String escapeString
          Expression preceded with this String won't be interpolated \${foo} will be replaced with ${foo}.
 
Fields inherited from class org.apache.maven.plugin.ear.AbstractEarMojo
APPLICATION_XML_URI, artifactTypeMappings, defaultLibBundleDir, encoding, generatedDescriptorLocation, META_INF, project, UTF_8, version
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
EarMojo()
           
 
Method Summary
 void execute()
           
 String getApplicationXml()
           
protected  String[] getExcludes()
          Returns a string array of the excludes to be used when assembling/copying the ear.
protected  String[] getIncludes()
          Returns a string array of the includes to be used when assembling/copying the ear.
protected  org.codehaus.plexus.archiver.jar.JarArchiver getJarArchiver()
          Returns the JarArchiver implementation used to package the EAR file.
 String[] getPackagingExcludes()
           
 String[] getPackagingIncludes()
           
 boolean isNonFilteredExtension(String fileName)
           
 void setApplicationXml(String applicationXml)
           
 void setPackagingExcludes(String packagingExcludes)
           
 void setPackagingIncludes(String packagingIncludes)
           
 void unpack(File source, File destDir)
          Unpacks the module into the EAR structure.
 
Methods inherited from class org.apache.maven.plugin.ear.AbstractEarMojo
getJbossConfiguration, getModules, getProject, getWorkDirectory
 
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

escapeString

@Parameter(property="maven.ear.escapeString")
protected String escapeString
Expression preceded with this String won't be interpolated \${foo} will be replaced with ${foo}.

Since:
2.3.2
Constructor Detail

EarMojo

public EarMojo()
Method Detail

execute

public void execute()
             throws MojoExecutionException,
                    MojoFailureException
Specified by:
execute in interface Mojo
Overrides:
execute in class AbstractEarMojo
Throws:
MojoExecutionException
MojoFailureException

getApplicationXml

public String getApplicationXml()

setApplicationXml

public void setApplicationXml(String applicationXml)

getExcludes

protected String[] getExcludes()
Returns a string array of the excludes to be used when assembling/copying the ear.

Returns:
an array of tokens to exclude

getIncludes

protected String[] getIncludes()
Returns a string array of the includes to be used when assembling/copying the ear.

Returns:
an array of tokens to include

getPackagingExcludes

public String[] getPackagingExcludes()

setPackagingExcludes

public void setPackagingExcludes(String packagingExcludes)

getPackagingIncludes

public String[] getPackagingIncludes()

setPackagingIncludes

public void setPackagingIncludes(String packagingIncludes)

unpack

public void unpack(File source,
                   File destDir)
            throws org.codehaus.plexus.archiver.manager.NoSuchArchiverException,
                   IOException,
                   org.codehaus.plexus.archiver.ArchiverException
Unpacks the module into the EAR structure.

Parameters:
source - File to be unpacked.
destDir - Location where to put the unpacked files.
Throws:
org.codehaus.plexus.archiver.manager.NoSuchArchiverException
IOException
org.codehaus.plexus.archiver.ArchiverException

getJarArchiver

protected org.codehaus.plexus.archiver.jar.JarArchiver getJarArchiver()
Returns the JarArchiver implementation used to package the EAR file.

By default the archiver is obtained from the Plexus container.

Returns:
the archiver

isNonFilteredExtension

public boolean isNonFilteredExtension(String fileName)


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