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:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

public class EarMojo
extends AbstractEarMojo

Builds J2EE Enteprise Archive (EAR) files.

Version:
$Id: EarMojo.java 746740 2009-02-22 15:44:32Z snicoll $
Author:
Stephane Nicoll
Is defined by the goal name:
ear
Is bound to the specified phase of the standard build lifecycle:
package
Requires the dependencies in this specified scope:
test

Field Summary
protected  java.lang.String escapeString
          Expression preceded with the 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, VERSION_1_3, VERSION_1_4, VERSION_5
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
EarMojo()
           
 
Method Summary
 void execute()
           
 java.lang.String getApplicationXml()
           
protected  java.lang.String[] getExcludes()
          Returns a string array of the excludes to be used when assembling/copying the ear.
protected  java.lang.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.
 boolean isNonFilteredExtension(java.lang.String fileName)
           
 void setApplicationXml(java.lang.String applicationXml)
           
 void unpack(java.io.File source, java.io.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

protected java.lang.String escapeString
Expression preceded with the String won't be interpolated \${foo} will be replaced with ${foo}

Since:
2.3.2
Is defined by:
expression:
${maven.ear.escapeString}
Constructor Detail

EarMojo

public EarMojo()
Method Detail

execute

public void execute()
             throws org.apache.maven.plugin.MojoExecutionException,
                    org.apache.maven.plugin.MojoFailureException
Specified by:
execute in interface org.apache.maven.plugin.Mojo
Overrides:
execute in class AbstractEarMojo
Throws:
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException

getApplicationXml

public java.lang.String getApplicationXml()

setApplicationXml

public void setApplicationXml(java.lang.String applicationXml)

getExcludes

protected java.lang.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 java.lang.String[] getIncludes()
Returns a string array of the includes to be used when assembling/copying the ear.

Returns:
an array of tokens to include

unpack

public void unpack(java.io.File source,
                   java.io.File destDir)
            throws org.codehaus.plexus.archiver.manager.NoSuchArchiverException,
                   java.io.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
java.io.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(java.lang.String fileName)


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