ear:ear
Full name:
org.apache.maven.plugins:maven-ear-plugin:3.4.0: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: ${basedir}/src/main/application |
<outputDirectory> |
String |
- |
The directory for the generated EAR. Default: ${project.build.directory} |
<outputFileNameMapping> |
String |
3.0.0 |
The file name mapping to use for all dependencies included in the EAR file. The mapping between artifacts and the file names which is used within the EAR file. See Customizing The File Name Mapping. Default: @{groupId}@-@{artifactId}@-@{version}@@{dashClassifier?}@.@{extension}@ |
<workDirectory> |
File |
- |
Directory that resources are copied to during the build. Default: ${project.build.directory}/${project.build.finalName} |
Optional Parameters
Name | Type | Since | Description |
---|---|---|---|
<applicationXml> |
File |
- |
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. Alias: excludes |
<earSourceIncludes> |
String |
- |
The comma separated list of tokens to include in the EAR. Default: ** Alias: includes |
<encoding> |
String |
- |
Character encoding for the auto-generated deployment file(s). Default: UTF-8 |
<escapeString> |
String |
2.3.2 |
Expression preceded with this 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: false |
<fileNameMapping> |
String |
- |
Deprecated. use outputFileNameMapping Only here to identify migration issues. The usage of this parameter will fail the build. |
<filtering> |
boolean |
2.3.2 |
Specify that the EAR sources should be filtered. Default: false |
<filters> |
List<String> |
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: ${project.build.directory} |
<includeLibInApplicationXml> |
Boolean |
- |
Should libraries be added in application.xml Default: 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 are multiple candidates. |
<modules> |
EarModule[] |
- |
The ear modules configuration. |
<nonFilteredFileExtensions> |
List<String> |
2.3.2 |
A list of file extensions that should not be filtered if filtering is enabled. |
<outputTimestamp> |
String |
3.1.0 |
Timestamp for reproducible output archive entries, either formatted as ISO 8601 yyyy-MM-dd'T'HH:mm:ssXXX or as an int representing seconds since the epoch (like SOURCE_DATE_EPOCH).Default: ${project.build.outputTimestamp} |
<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[]. |
<skinnyModules> |
boolean |
3.2.0 |
Whether to create skinny EAR modules or not. A skinny EAR module is a WAR, SAR, HAR, RAR or WSR module that does not contain all of its dependencies in it. Instead those dependencies are shared between the WARs, SARs, HARs, RARs and WSRs through the EAR. This option takes precedence over skinnyWars option. That is if skinnyModules is true but skinnyWars is false (explicitly or by default) then all modules including WARs are skinny.Default: false |
<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: false |
<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: false |
<unpackTypes> |
String |
- |
The comma separated list of artifact's type(s) to unpack by default. |
<version> |
String |
- |
The schema version of generated application.xml descriptor.
Valid values are 1.3, 1.4, 5, 6, 7, 8, 9, 10 and 11. Default: 7 |
Parameter Details
<applicationXml>
The location of a custom application.xml file to be used within the EAR file.
- Type:
java.io.File
- 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
- Alias:
excludes
<earSourceIncludes>
The comma separated list of tokens to include in the EAR.
- Type:
java.lang.String
- Required:
No
- Default:
**
- Alias:
includes
<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
<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
- Default:
false
<fileNameMapping>
Deprecated.
use
use
outputFileNameMapping
Only here to identify migration issues. The usage of this parameter will fail the build.
- 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<java.lang.String>
- Since:
2.3.2
- Required:
No
<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 are multiple candidates.
- Type:
java.lang.String
- Required:
No
<modules>
The ear modules configuration.
- Type:
org.apache.maven.plugins.ear.EarModule[]
- Required:
No
<nonFilteredFileExtensions>
A list of file extensions that should not be filtered if filtering is enabled.
- Type:
java.util.List<java.lang.String>
- Since:
2.3.2
- Required:
No
<outputDirectory>
The directory for the generated EAR.
- Type:
java.lang.String
- Required:
Yes
- Default:
${project.build.directory}
<outputFileNameMapping>
The file name mapping to use for all dependencies included in the EAR file. The mapping between artifacts and the file names which is used within the EAR file. See Customizing The File Name Mapping.
- Type:
java.lang.String
- Since:
3.0.0
- Required:
Yes
- Default:
@{groupId}@-@{artifactId}@-@{version}@@{dashClassifier?}@.@{extension}@
<outputTimestamp>
Timestamp for reproducible output archive entries, either formatted as ISO 8601
yyyy-MM-dd'T'HH:mm:ssXXX
or as an int representing seconds since the epoch (like SOURCE_DATE_EPOCH).- Type:
java.lang.String
- Since:
3.1.0
- Required:
No
- Default:
${project.build.outputTimestamp}
<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
<skinnyModules>
Whether to create skinny EAR modules or not. A skinny EAR module is a WAR, SAR, HAR, RAR or WSR module that does not contain all of its dependencies in it. Instead those dependencies are shared between the WARs, SARs, HARs, RARs and WSRs through the EAR. This option takes precedence over
skinnyWars
option. That is if skinnyModules is true
but skinnyWars
is false
(explicitly or by default) then all modules including WARs are skinny.- Type:
boolean
- Since:
3.2.0
- Required:
No
- Default:
false
<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
- 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
<unpackTypes>
The comma separated list of artifact's type(s) to unpack by default.
- Type:
java.lang.String
- Required:
No
<version>
The schema version of generated
application.xml
descriptor.
Valid values are 1.3, 1.4, 5, 6, 7, 8, 9, 10 and 11.
- Type:
java.lang.String
- Required:
No
- Default:
7
<workDirectory>
Directory that resources are copied to during the build.
- Type:
java.io.File
- Required:
Yes
- Default:
${project.build.directory}/${project.build.finalName}