ear:generate-application-xml

Full name:

org.apache.maven.plugins:maven-ear-plugin:3.2.0: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.
  • Binds by default to the lifecycle phase: generate-resources.

Required Parameters

Name Type Since Description
<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. Details see Maven Mapping Reference.
Default value is: @{groupId}@-@{artifactId}@-@{version}@@{dashClassifier?}@.@{extension}@.
<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
<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}.
<ejbRefs> PlexusConfiguration - The ejb-ref entries.
Alias is: ejb-refs.
<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.
Alias is: env-entries.
<fileNameMapping> String - Deprecated. No reason given
<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.
<resourceRefs> PlexusConfiguration - The resource-ref entries.
<security> PlexusConfiguration - The security-roles to be added to the auto-generated application.xml file.
<useBaseVersion> Boolean - When using a outputFileNameMapping 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, 7 and 8.
Default value is: 7.

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}

<ejbRefs>

The ejb-ref entries.
  • Type: org.codehaus.plexus.configuration.PlexusConfiguration
  • Required: No
  • Alias: ejb-refs

<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
  • Alias: env-entries

<fileNameMapping>

Deprecated. No reason given
Only here to identify migration issues. The usage of this parameter will fail the build. If you need file name mapping please use outputFileNameMapping instead.
  • 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.plugins.ear.EarModule[]
  • Required: No

<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. Details see Maven Mapping Reference.
  • Type: java.lang.String
  • Since: 3.0.0
  • Required: Yes
  • Default: @{groupId}@-@{artifactId}@-@{version}@@{dashClassifier?}@.@{extension}@

<resourceRefs>

The resource-ref entries.
  • Type: org.codehaus.plexus.configuration.PlexusConfiguration
  • Required: No

<security>

The security-roles to be added to the auto-generated application.xml file.
  • Type: org.codehaus.plexus.configuration.PlexusConfiguration
  • Required: No

<tempFolder>

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

<useBaseVersion>

When using a outputFileNameMapping 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
  • Required: No

<version>

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