ear:generate-application-xml

Full name:

org.apache.maven.plugins:maven-ear-plugin:2.9.1:generate-application-xml

Description:

Generates the EAR deployment descriptor file(s).

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: generate-resources.

Required Parameters

Name Type Since Description
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
applicationId String 2.9 Defines the application id used when generating the deployment descriptor.
applicationName String - Application name of the application to be used when the application.xml file is auto-generated. Since JavaEE6.
artifactTypeMappings PlexusConfiguration - The artifact type mappings.
defaultLibBundleDir String - The default bundle dir for libraries.
description String - Description of the application to be used when the application.xml file is auto-generated.
Default value is: ${project.description}.
displayName String - Display name of the application to be used when the application.xml file is auto-generated.
Default value is: ${project.artifactId}.
encoding String - Character encoding for the auto-generated deployment file(s).
Default value is: UTF-8.
envEntries PlexusConfiguration - The env-entries to be added to the auto-generated application.xml file. Since JavaEE6.
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.
generateApplicationXml Boolean - Whether the application.xml should be generated or not.
Default value is: true.
generateModuleId Boolean - Whether a module ID should be generated if none is specified.
Default value is: false.
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.
initializeInOrder Boolean - Defines the value of the initialize in order element to be used when the application.xml file is auto-generated. When set to true, modules must be initialized in the order they're listed in this deployment descriptor, with the exception of application client modules, which can be initialized in any order. If initialize-in-order is not set or set to false, the order of initialization is unspecified and may be product-dependent. Since JavaEE6.
jboss PlexusConfiguration - The JBoss specific configuration.
libraryDirectoryMode String - Defines how the library-directory element should be written in the application.xml file. Three special values can be set:
  • DEFAULT (default) generates a library-directory element with the value of the defaultLibBundleDir parameter
  • EMPTY generates an empty library-directory element. Per spec, this disables the scanning of jar files in the lib directory of the ear file
  • NONE does not write the library-directory element at all. A corner case that can be used in Oracle Weblogic to delegate the classloading to the container
Since JavaEE5.
Default value is: DEFAULT.
mainArtifactId String - The id to use to define the main artifact (e.g. the artifact without a classifier) when there is multiple candidates.
modules EarModule[] - The ear modules configuration.
security PlexusConfiguration - The security-roles to be added to the auto-generated application.xml file.
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.
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

applicationId:

Defines the application id used when generating the deployment descriptor.
  • Type: java.lang.String
  • Since: 2.9
  • Required: No

applicationName:

Application name of the application to be used when the application.xml file is auto-generated. Since JavaEE6.
  • Type: java.lang.String
  • Required: No

artifactTypeMappings:

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

defaultLibBundleDir:

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

description:

Description of the application to be used when the application.xml file is auto-generated.
  • Type: java.lang.String
  • Required: No
  • Default: ${project.description}

displayName:

Display name of the application to be used when the application.xml file is auto-generated.
  • Type: java.lang.String
  • Required: No
  • Default: ${project.artifactId}

encoding:

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

envEntries:

The env-entries to be added to the auto-generated application.xml file. Since JavaEE6.
  • Type: org.codehaus.plexus.configuration.PlexusConfiguration
  • Required: No

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

generateApplicationXml:

Whether the application.xml should be generated or not.
  • Type: java.lang.Boolean
  • Required: No
  • Default: true

generateModuleId:

Whether a module ID should be generated if none is specified.
  • Type: java.lang.Boolean
  • Required: No
  • Default: false

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

initializeInOrder:

Defines the value of the initialize in order element to be used when the application.xml file is auto-generated. When set to true, modules must be initialized in the order they're listed in this deployment descriptor, with the exception of application client modules, which can be initialized in any order. If initialize-in-order is not set or set to false, the order of initialization is unspecified and may be product-dependent. Since JavaEE6.
  • Type: java.lang.Boolean
  • Required: No

jboss:

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

libraryDirectoryMode:

Defines how the library-directory element should be written in the application.xml file. Three special values can be set:
  • DEFAULT (default) generates a library-directory element with the value of the defaultLibBundleDir parameter
  • EMPTY generates an empty library-directory element. Per spec, this disables the scanning of jar files in the lib directory of the ear file
  • NONE does not write the library-directory element at all. A corner case that can be used in Oracle Weblogic to delegate the classloading to the container
Since JavaEE5.
  • Type: java.lang.String
  • Required: No
  • Default: DEFAULT

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

modules:

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

security:

The security-roles to be added to the auto-generated application.xml file.
  • Type: org.codehaus.plexus.configuration.PlexusConfiguration
  • 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

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}