Package org.apache.maven.plugins.ear
Class EarMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.apache.maven.plugins.ear.AbstractEarMojo
org.apache.maven.plugins.ear.EarMojo
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled
,org.apache.maven.plugin.Mojo
@Mojo(name="ear",
defaultPhase=PACKAGE,
threadSafe=true,
requiresDependencyResolution=TEST)
public class EarMojo
extends AbstractEarMojo
Builds J2EE Enterprise Archive (EAR) files.
- Author:
- Stephane Nicoll
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected String
Expression preceded with this String won't be interpolated \${foo} will be replaced with ${foo}.Fields inherited from class org.apache.maven.plugins.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
ConstructorsConstructorDescriptionEarMojo
(org.codehaus.plexus.archiver.ear.EarArchiver earArchiver, org.codehaus.plexus.archiver.jar.JarArchiver jarArchiver, org.apache.maven.project.MavenProjectHelper projectHelper, org.codehaus.plexus.archiver.manager.ArchiverManager archiverManager, org.apache.maven.shared.filtering.MavenFileFilter mavenFileFilter, org.apache.maven.shared.filtering.MavenResourcesFiltering mavenResourcesFiltering) -
Method Summary
Modifier and TypeMethodDescriptionvoid
execute()
protected String[]
Returns a string array of the excludes to be used when assembling/copying the ear.protected String[]
Returns a string array of the includes to be used when assembling/copying the ear.String[]
String[]
boolean
isNonFilteredExtension
(String fileName) void
setApplicationXml
(File applicationXml) void
setPackagingExcludes
(String packagingExcludes) void
setPackagingIncludes
(String packagingIncludes) void
unpack
(File source, File destDir, Collection<String> outdatedResources) Unpacks the module into the EAR structure.Methods inherited from class org.apache.maven.plugins.ear.AbstractEarMojo
getAllEarModules, getJbossConfiguration, getModules, getOutputFileNameMapping, getProject, getProvidedEarModules, getWorkDirectory
Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
Field Details
-
escapeString
Expression preceded with this String won't be interpolated \${foo} will be replaced with ${foo}.- Since:
- 2.3.2
-
-
Constructor Details
-
Method Details
-
execute
public void execute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException- Specified by:
execute
in interfaceorg.apache.maven.plugin.Mojo
- Overrides:
execute
in classAbstractEarMojo
- Throws:
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException
-
getApplicationXml
- Returns:
applicationXml
-
setApplicationXml
- Parameters:
applicationXml
-applicationXml
-
getExcludes
Returns a string array of the excludes to be used when assembling/copying the ear.- Returns:
- an array of tokens to exclude
-
getIncludes
Returns a string array of the includes to be used when assembling/copying the ear.- Returns:
- an array of tokens to include
-
getPackagingExcludes
- Returns:
- The array with the packaging excludes.
-
setPackagingExcludes
- Parameters:
packagingExcludes
-packagingExcludes
-
getPackagingIncludes
- Returns:
- the arrays with the includes
-
setPackagingIncludes
- Parameters:
packagingIncludes
-packagingIncludes
-
unpack
public void unpack(File source, File destDir, Collection<String> outdatedResources) throws org.codehaus.plexus.archiver.ArchiverException, org.codehaus.plexus.archiver.manager.NoSuchArchiverException, IOException Unpacks the module into the EAR structure.- Parameters:
source
- file to be unpackeddestDir
- where to put the unpacked filesoutdatedResources
- currently outdated resources- Throws:
org.codehaus.plexus.archiver.ArchiverException
- a corrupt archiveorg.codehaus.plexus.archiver.manager.NoSuchArchiverException
- if we don't have an appropriate archiverIOException
- in case of a general IOException
-
isNonFilteredExtension
- Parameters:
fileName
- the name of the file which should be checked- Returns:
true
if the name is part of the non filtered extensions;false
otherwise
-