ear:ear

Full name:

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

Description:

Builds J2EE Enterprise Archive (EAR) files.

Attributes:

  • Requires a Maven 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}.
tempFolder File - temp folder location.
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.
duplicateArtifactsBreakTheBuild boolean 2.10 The list of artifacts is checked and if you set this to true the build will fail if duplicate artifacts have been found within the build configuration.
Default value is: false.
User property is: maven.ear.duplicateArtifactsBreakTheBuild.
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 this String won't be interpolated \${foo} will be replaced with ${foo}.
User property is: maven.ear.escapeString.
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.
User property is: maven.ear.escapedBackslashesInFilePath.
fileNameMapping String - The file name mapping to use for all dependencies included in the EAR file. The following values are valid standard, {code no-version}, full, no-version-for-ejb. The standard means the filename is the artifactId incl. the version of the artifact. The no-version means the files is only the artifactId without the version. The full means the filename is the groupId+artifactId+version of the artifact. The no-version-for-ejb means the filename is the artifactId without the version in case of EJB type.
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 no 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.
packagingExcludes String 2.7 A comma separated list of tokens to exclude when packaging the EAR. By default nothing is excluded. Note that you can use the Java Regular Expressions engine to include and exclude specific pattern using the expression %regex[]. Hint: read the about (?!Pattern).
packagingIncludes String 2.7 A comma separated list of tokens to include when packaging the EAR. By default everything is included. Note that you can use the Java Regular Expressions engine to include and exclude specific pattern using the expression %regex[].
skinnyWars boolean 2.7 Whether to create skinny WARs or not. A skinny WAR is a WAR that does not have all of its dependencies in WEB-INF/lib. Instead those dependencies are shared between the WARs through the EAR.
Default value is: false.
User property is: maven.ear.skinnyWars.
skipClassPathModification boolean 2.10 In case of using the skinnyWars and defaultLibBundleDir usually the classpath will be modified. By settings this option true you can change this and keep the classpath untouched. This option has been introduced to keep the backward compatibility with earlier versions of the plugin.
Default value is: false.
unpackTypes String - The comma separated list of artifact's type(s) to unpack by default.
useBaseVersion Boolean 2.9 When using a fileNameMapping with versions, either use the baseVersion or the version. When the artifact is a SNAPSHOT, version will always return a value with a -SNAPSHOT postfix instead of the possible timestamped value.
useJvmChmod boolean 2.9 (no description)
Default value is: true.
User property is: maven.ear.useJvmChmod.
version String - The version of the application.xml to generate. Valid values are 1.3, 1.4, 5, 6 and 7.
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

duplicateArtifactsBreakTheBuild:

The list of artifacts is checked and if you set this to true the build will fail if duplicate artifacts have been found within the build configuration.
  • Type: boolean
  • Since: 2.10
  • Required: No
  • User Property: maven.ear.duplicateArtifactsBreakTheBuild
  • Default: false

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 this String won't be interpolated \${foo} will be replaced with ${foo}.
  • Type: java.lang.String
  • Since: 2.3.2
  • Required: No
  • User Property: 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
  • User Property: maven.ear.escapedBackslashesInFilePath
  • Default: false

fileNameMapping:

The file name mapping to use for all dependencies included in the EAR file. The following values are valid standard, {code no-version}, full, no-version-for-ejb. The standard means the filename is the artifactId incl. the version of the artifact. The no-version means the files is only the artifactId without the version. The full means the filename is the groupId+artifactId+version of the artifact. The no-version-for-ejb means the filename is the artifactId without the version in case of EJB type.
  • 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 no 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}

packagingExcludes:

A comma separated list of tokens to exclude when packaging the EAR. By default nothing is excluded. Note that you can use the Java Regular Expressions engine to include and exclude specific pattern using the expression %regex[]. Hint: read the about (?!Pattern).
  • Type: java.lang.String
  • Since: 2.7
  • Required: No

packagingIncludes:

A comma separated list of tokens to include when packaging the EAR. By default everything is included. Note that you can use the Java Regular Expressions engine to include and exclude specific pattern using the expression %regex[].
  • Type: java.lang.String
  • Since: 2.7
  • Required: No

skinnyWars:

Whether to create skinny WARs or not. A skinny WAR is a WAR that does not have all of its dependencies in WEB-INF/lib. Instead those dependencies are shared between the WARs through the EAR.
  • Type: boolean
  • Since: 2.7
  • Required: No
  • User Property: maven.ear.skinnyWars
  • Default: false

skipClassPathModification:

In case of using the skinnyWars and defaultLibBundleDir usually the classpath will be modified. By settings this option true you can change this and keep the classpath untouched. This option has been introduced to keep the backward compatibility with earlier versions of the plugin.
  • Type: boolean
  • Since: 2.10
  • Required: No
  • Default: false

tempFolder:

temp folder location.
  • Type: java.io.File
  • Required: Yes
  • Default: ${project.build.directory}

unpackTypes:

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

useBaseVersion:

When using a fileNameMapping with versions, either use the baseVersion or the version. When the artifact is a SNAPSHOT, version will always return a value with a -SNAPSHOT postfix instead of the possible timestamped value.
  • Type: java.lang.Boolean
  • Since: 2.9
  • Required: No

useJvmChmod:

(no description)
  • Type: boolean
  • Since: 2.9
  • Required: No
  • User Property: maven.ear.useJvmChmod
  • Default: true

version:

The version of the application.xml to generate. Valid values are 1.3, 1.4, 5, 6 and 7.
  • 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}