ear:ear

Builds J2EE Enteprise Archive (EAR) files.

Mojo Attributes:

  • Requires a Maven 2.0 project to execute.
  • Requires dependency resolution of artifacts in scope: test
  • Automatically executes within the lifecycle phase: package

Required Parameters

Name Type Description
earSourceDirectory File Single directory for extra files to include in the EAR.
finalName String The name of the EAR file to generate.
outputDirectory String The directory for the generated EAR.
workDirectory File Directory that resources are copied to during the build.

Optional Parameters

Name Type Description
applicationXml String The location of a custom application.xml file to be used within the ear file.
archive MavenArchiveConfiguration The maven archiver to use.
archiverManager ArchiverManager The archive manager.
artifactTypeMappings PlexusConfiguration The artifact type mappings.
classifier String Classifier to add to the artifact generated. If given, the artifact will be an attachment instead.
defaultLibBundleDir String The default bundle dir for libraries.
earSourceExcludes String The comma separated list of tokens to exclude from the EAR.
earSourceIncludes String The comma separated list of tokens to include in the EAR. Default is '**'.
encoding String Character encoding for the auto-generated deployment file(s).
fileNameMapping String The file name mapping to use for all dependencies included in the EAR file.
generatedDescriptorLocation String Directory where the deployment descriptor file(s) will be auto-generated.
jboss PlexusConfiguration The JBoss specific configuration.
mainArtifactId String The id to use to define the main artifact (e.g. the artifact without a classifier) when there is multiple candidates.
manifestFile File The location of the manifest file to be used within the ear file.
modules EarModule[] The ear modules configuration.
projectHelper MavenProjectHelper No description.
resourcesDir File The directory to get the resources from.
unpackTypes String The comma separated list of artifact's type(s) to unpack by default.

Parameter Details

applicationXml The location of a custom application.xml file to be used within the ear file.
  • Type: java.lang.String
  • Required: No

archive The maven archiver to use.
  • Type: org.apache.maven.archiver.MavenArchiveConfiguration
  • Required: No

archiverManager The archive manager.
  • Type: org.codehaus.plexus.archiver.manager.ArchiverManager
  • Required: No

artifactTypeMappings The artifact type mappings.
  • Type: org.codehaus.plexus.configuration.PlexusConfiguration
  • Required: No

classifier Classifier to add to the artifact generated. If given, the artifact will be an attachment instead.
  • Type: java.lang.String
  • Required: No

defaultLibBundleDir The default bundle dir for libraries.
  • Type: java.lang.String
  • Required: No

earSourceDirectory Single directory for extra files to include in the EAR.
  • Type: java.io.File
  • Required: Yes
  • Expression: ${basedir}/src/main/application

earSourceExcludes The comma separated list of tokens to exclude from the EAR.
  • Type: java.lang.String
  • Required: No

earSourceIncludes The comma separated list of tokens to include in the EAR. Default is '**'.
  • Type: java.lang.String
  • Required: No

encoding Character encoding for the auto-generated deployment file(s).
  • Type: java.lang.String
  • Required: No

fileNameMapping The file name mapping to use for all dependencies included in the EAR file.
  • Type: java.lang.String
  • Required: No

finalName The name of the EAR file to generate.
  • Type: java.lang.String
  • Required: Yes
  • Expression: ${project.build.finalName}

generatedDescriptorLocation Directory where the deployment descriptor file(s) will be auto-generated.
  • Type: java.lang.String
  • Required: No
  • Expression: ${project.build.directory}

jboss The JBoss specific configuration.
  • Type: org.codehaus.plexus.configuration.PlexusConfiguration
  • Required: No

mainArtifactId The id to use to define the main artifact (e.g. the artifact without a classifier) when there is multiple candidates.
  • Type: java.lang.String
  • Required: No

manifestFile The location of the manifest file to be used within the ear file.
  • Type: java.io.File
  • Required: No
  • Expression: ${basedir}/src/main/application/META-INF/MANIFEST.MF

modules The ear modules configuration.
  • Type: org.apache.maven.plugin.ear.EarModule[]
  • Required: No

outputDirectory The directory for the generated EAR.
  • Type: java.lang.String
  • Required: Yes
  • Expression: ${project.build.directory}

projectHelper No Description.
  • Type: org.apache.maven.project.MavenProjectHelper
  • Required: No

resourcesDir The directory to get the resources from.
  • Type: java.io.File
  • Required: No

unpackTypes The comma separated list of artifact's type(s) to unpack by default.
  • Type: java.lang.String
  • Required: No

workDirectory Directory that resources are copied to during the build.
  • Type: java.io.File
  • Required: Yes
  • Expression: ${project.build.directory}/${project.build.finalName}