ear:ear

Full name:

org.apache.maven.plugins:maven-ear-plugin:2.5:ear

Description:

Builds J2EE Enteprise Archive (EAR) files.

Attributes:

  • Requires a Maven 2.0 project to be executed.
  • Requires dependency resolution of artifacts in scope: test.
  • The goal is thread-safe and supports parallel builds.
  • Binds by default to the lifecycle phase: package.

Required Parameters

Name Type Since Description
earSourceDirectory File - Single directory for extra files to include in the EAR.
Default value is: ${basedir}/src/main/application.
finalName String - The name of the EAR file to generate.
Default value is: ${project.build.finalName}.
outputDirectory String - The directory for the generated EAR.
Default value is: ${project.build.directory}.
workDirectory File - Directory that resources are copied to during the build.
Default value is: ${project.build.directory}/${project.build.finalName}.

Optional Parameters

Name Type Since Description
applicationXml String - The location of a custom application.xml file to be used within the ear file.
archive MavenArchiveConfiguration - The archive configuration to use. See Maven Archiver Reference.
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 value is: **.
encoding String - Character encoding for the auto-generated deployment file(s).
Default value is: UTF-8.
escapeString String 2.3.2 Expression preceded with the String won't be interpolated \${foo} will be replaced with ${foo}
escapedBackslashesInFilePath boolean 2.3.2 To escape interpolated value with windows path c:\foo\bar will be replaced with c:\\foo\\bar
Default value is: false.
fileNameMapping String - The file name mapping to use for all dependencies included in the EAR file.
filtering boolean 2.3.2 Specify that the ear sources should be filtered.
Default value is: false.
filters List 2.3.2 Filters (property files) to include during the interpolation of the pom.xml.
generatedDescriptorLocation String - Directory where the deployment descriptor file(s) will be auto-generated.
Default value is: ${project.build.directory}.
includeLibInApplicationXml Boolean - Should libraries be added in application.xml
Default value is: false.
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. If not value if specified, the default location in the workDirectory is taken. If the file does not exist, a manifest will be generated automatically.
modules EarModule[] - The ear modules configuration.
nonFilteredFileExtensions List 2.3.2 A list of file extensions that should not be filtered if filtering is enabled.
resourcesDir File - Deprecated. please use earSourcesDirectory instead
unpackTypes String - The comma separated list of artifact's type(s) to unpack by default.
version String - The version of the application.xml to generate. Valid values are 1.3, 1.4, 5 and 6.
Default value is: 1.3.

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 archive configuration to use. See Maven Archiver Reference.
  • Type: org.apache.maven.archiver.MavenArchiveConfiguration
  • 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
  • Default: ${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.
  • Type: java.lang.String
  • Required: No
  • Default: **

encoding:

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

escapeString:

Expression preceded with the String won't be interpolated \${foo} will be replaced with ${foo}
  • Type: java.lang.String
  • Since: 2.3.2
  • Required: No
  • Expression: ${maven.ear.escapeString}

escapedBackslashesInFilePath:

To escape interpolated value with windows path c:\foo\bar will be replaced with c:\\foo\\bar
  • Type: boolean
  • Since: 2.3.2
  • Required: No
  • Expression: ${maven.ear.escapedBackslashesInFilePath}
  • Default: false

fileNameMapping:

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

filtering:

Specify that the ear sources should be filtered.
  • Type: boolean
  • Since: 2.3.2
  • Required: No
  • Default: false

filters:

Filters (property files) to include during the interpolation of the pom.xml.
  • Type: java.util.List
  • Since: 2.3.2
  • Required: No

finalName:

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

generatedDescriptorLocation:

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

includeLibInApplicationXml:

Should libraries be added in application.xml
  • Type: java.lang.Boolean
  • Required: No
  • Default: false

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. If not value if specified, the default location in the workDirectory is taken. If the file does not exist, a manifest will be generated automatically.
  • Type: java.io.File
  • Required: No

modules:

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

nonFilteredFileExtensions:

A list of file extensions that should not be filtered if filtering is enabled.
  • Type: java.util.List
  • Since: 2.3.2
  • Required: No

outputDirectory:

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

resourcesDir:

Deprecated. please use earSourcesDirectory instead
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

version:

The version of the application.xml to generate. Valid values are 1.3, 1.4, 5 and 6.
  • Type: java.lang.String
  • Required: No
  • Default: 1.3

workDirectory:

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