EAR Modules
The EAR Plugin supports additional configurations of the following modules:
If the artifact you want to configure is not listed above, you can create your own custom artifact configuration by following the adding custom artifact types guide below this page.
These module names go into the modules parameter of the EAR Plugin. For example, to configure the properties of an EjbModule, the EAR Plugin configuration for modules would look like:
<project>
[...]
<build>
[...]
<plugins>
[...]
<plugin>
<artifactId>maven-ear-plugin</artifactId>
<version>2.6</version>
<configuration>
<modules>
<ejbModule>
<!-- property configurations goes here -->
</ejbModule>
</modules>
</configuration>
</plugin>
[...]
</project>
The following configuration options are available for EjbClientModule:
- groupId - sets the groupId of the ejb-client artifact you want to configure.
- artifactId - sets the artifactId of the ejb-client artifact you want to configure.
- classifier - sets the classifier of the ejb-client artifact you want to configure if multiple ejb-client artifacts matches the groupId/artifact. Use the mainArtifactId ('none' by default) to define the main artifact (e.g. the artifact without a classifier)
- bundleDir - sets the location of this artifact inside the ear archive. If not set, this artifact will be packaged in the root of the archive.
- bundleFileName - sets the new name of this artifact inside the ear archive. If not set, the artifact's filename in the repository is used.
- excluded - set to true to exclude this artifact from being packaged into the ear archive. Default is false.
- uri - sets the URI path of this artifact within the ear archive. Automatically determined when not set.
- unpack - set to true to unpack this artifact into the ear archive according to its uri. Default is false.
- altDeploymentDescriptor - sets the alternative deployment descriptor for this module.
- moduleId - sets the id of the module in the generated application.xml.
The following configuration options are available for EjbModule:
- groupId - sets the groupId of the ejb artifact you want to configure.
- artifactId - sets the artifactId of the ejb artifact you want to configure.
- classifier - sets the classifier of the ejb artifact you want to configure if multiple ejb artifacts matches the groupId/artifact. Use the mainArtifactId ('none' by default) to define the main artifact (e.g. the artifact without a classifier)
- bundleDir - sets the location of this artifact inside the ear archive. If not set, this artifact will be packaged in the root of the archive.
- bundleFileName - sets the new name of this artifact inside the ear archive. If not set, the artifact's filename in the repository is used.
- excluded - set to true to exclude this artifact from being packaged into the ear archive. Default is false.
- uri - sets the uri path of this artifact within the ear archive. Automatically determined when not set.
- unpack - set to true to unpack this artifact into the ear archive according to its uri. Default is false.
- altDeploymentDescriptor - sets the alternative deployment descriptor for this module.
- moduleId - sets the id of the module in the generated application.xml.
The following configuration options are available for JarModule:
- groupId - sets the groupId of the jar artifact you want to configure.
- artifactId - sets the artifactId of the jar artifact you want to configure.
- classifier - sets the classifier of the jar artifact you want to configure if multiple jar artifacts matches the groupId/artifact. Use the mainArtifactId ('none' by default) to define the main artifact (e.g. the artifact without a classifier)
- bundleDir - sets the location of this artifact inside the ear archive. If not set, this artifact will be packaged in the root of the archive.
- bundleFileName - sets the new name of this artifact inside the ear archive. If not set, the artifact's filename in the repository is used.
- excluded - set to true to exclude this artifact from being packaged into the ear archive. Default is false.
- uri - sets the uri path of this artifact within the ear archive. Automatically determined when not set.
- unpack - set to true to unpack this artifact into the ear archive according to its uri. Default is false.
- altDeploymentDescriptor - sets the alternative deployment descriptor for this module.
- moduleId - sets the id of the module in the generated application.xml.
- includeInApplicationXml - set to true to if you want to generate an entry of this module in application.xml. Default is false.
The following configuration options are available for ParModule:
- groupId - sets the groupId of the par artifact you want to configure.
- artifactId - sets the artifactId of the par artifact you want to configure.
- classifier - sets the classifier of the par artifact you want to configure if multiple par artifacts matches the groupId/artifact. Use the mainArtifactId ('none' by default) to define the main artifact (e.g. the artifact without a classifier)
- bundleDir - sets the location of this artifact inside the ear archive. If not set, this artifact will be packaged in the root of the archive.
- bundleFileName - sets the new name of this artifact inside the ear archive. If not set, the artifact's filename in the repository is used.
- excluded - set to true to exclude this artifact from being packaged into the ear archive. Default is false.
- uri - sets the uri path of this artifact within the ear archive. Automatically determined when not set.
- unpack - set to true to unpack this artifact into the ear archive according to its uri. Default is false.
- altDeploymentDescriptor - sets the alternative deployment descriptor for this module.
- moduleId - sets the id of the module in the generated application.xml.
The following configuration options are available for RarModule:
- groupId - sets the groupId of the rar artifact you want to configure.
- artifactId - sets the artifactId of the rar artifact you want to configure.
- classifier - sets the classifier of the rar artifact you want to configure if multiple rar artifacts matches the groupId/artifact. Use the mainArtifactId ('none' by default) to define the main artifact (e.g. the artifact without a classifier)
- bundleDir - sets the location of this artifact inside the ear archive. If not set, this artifact will be packaged in the root of the archive.
- bundleFileName - sets the new name of this artifact inside the ear archive. If not set, the artifact's filename in the repository is used.
- excluded - set to true to exclude this artifact from being packaged into the ear archive. Default is false.
- uri - sets the uri path of this artifact within the ear archive. Automatically determined when not set.
- unpack - set to true to unpack this artifact into the ear archive according to its uri. Default is false.
- altDeploymentDescriptor - sets the alternative deployment descriptor for this module.
- moduleId - sets the id of the module in the generated application.xml.
The following configuration options are available for SarModule:
- groupId - sets the groupId of the sar artifact you want to configure.
- artifactId - sets the artifactId of the sar artifact you want to configure.
- classifier - sets the classifier of the sar artifact you want to configure if multiple sar artifacts matches the groupId/artifact. Use the mainArtifactId ('none' by default) to define the main artifact (e.g. the artifact without a classifier)
- bundleDir - sets the location of this artifact inside the ear archive. If not set, this artifact will be packaged in the root of the archive.
- bundleFileName - sets the new name of this artifact inside the ear archive. If not set, the artifact's filename in the repository is used.
- excluded - set to true to exclude this artifact from being packaged into the ear archive. Default is false.
- uri - sets the uri path of this artifact within the ear archive. Automatically determined when not set.
- unpack - set to true to unpack this artifact into the ear archive according to its uri. Default is false.
- moduleId - sets the id of the module in the generated application.xml.
The following configuration options are available for WebModule:
- groupId - sets the groupId of the web artifact you want to configure.
- artifactId - sets the artifactId of the web artifact you want to configure.
- classifier - sets the classifier of the web artifact you want to configure if multiple web artifacts matches the groupId/artifact. Use the mainArtifactId ('none' by default) to define the main artifact (e.g. the artifact without a classifier)
- bundleDir - sets the location of this artifact inside the ear archive. If not set, this artifact will be packaged in the root of the archive.
- bundleFileName - sets the new name of this artifact inside the ear archive. If not set, the artifact's filename in the repository is used.
- excluded - set to true to exclude this artifact from being packaged into the ear archive. Default is false.
- uri - sets the uri path of this artifact within the ear archive. Automatically determined when not set.
- unpack - set to true to unpack this artifact into the ear archive according to its uri. Default is false.
- altDeploymentDescriptor - sets the alternative deployment descriptor for this module.
- moduleId - sets the id of the module in the generated application.xml.
- contextRoot - sets the context root of this web artifact.
The following configuration options are available for WsrModule:
- groupId - sets the groupId of the wsr artifact you want to configure.
- artifactId - sets the artifactId of the wsr artifact you want to configure.
- classifier - sets the classifier of the wst artifact you want to configure if multiple wsr artifacts matches the groupId/artifact. Use the mainArtifactId ('none' by default) to define the main artifact (e.g. the artifact without a classifier)
- bundleDir - sets the location of this artifact inside the ear archive. If not set, this artifact will be packaged in the root of the archive.
- bundleFileName - sets the new name of this artifact inside the ear archive. If not set, the artifact's filename in the repository is used.
- excluded - set to true to exclude this artifact from being packaged into the ear archive. Default is false.
- uri - sets the uri path of this artifact within the ear archive. Automatically determined when not set.
- unpack - set to true to unpack this artifact into the ear archive according to its uri. Default is false.
- altDeploymentDescriptor - sets the alternative deployment descriptor for this module.
- moduleId - sets the id of the module in the generated application.xml.
The following configuration options are available for HarModule:
- groupId - sets the groupId of the hibernate archive artifact you want to configure.
- artifactId - sets the artifactId of the hibernate archive artifact you want to configure.
- classifier - sets the classifier of the hibernate archive artifact you want to configure if multiple hibernate archive artifacts matches the groupId/artifact. Use the mainArtifactId ('none' by default) to define the main artifact (e.g. the artifact without a classifier)
- bundleDir - sets the location of this artifact inside the ear archive. If not set, this artifact will be packaged in the root of the archive.
- bundleFileName - sets the new name of this artifact inside the ear archive. If not set, the artifact's filename in the repository is used.
- excluded - set to true to exclude this artifact from being packaged into the ear archive. Default is false.
- uri - sets the uri path of this artifact within the ear archive. Automatically determined when not set.
- unpack - set to true to unpack this artifact into the ear archive according to its uri. Default is false.
The following configuration options are available for AppClientModule:
- groupId - sets the groupId of the application client artifact you want to configure.
- artifactId - sets the artifactId of the applicant client artifact you want to configure.
- classifier - sets the classifier of the application client artifact you want to configure if multiple application client artifacts matches the groupId/artifact. Use the mainArtifactId ('none' by default) to define the main artifact (e.g. the artifact without a classifier)
- bundleDir - sets the location of this artifact inside the ear archive. If not set, this artifact will be packaged in the root of the archive.
- bundleFileName - sets the new name of this artifact inside the ear archive. If not set, the artifact's filename in the repository is used.
- excluded - set to true to exclude this artifact from being packaged into the ear archive. Default is false.
- uri - sets the uri path of this artifact within the ear archive. Automatically determined when not set.
- unpack - set to true to unpack this artifact into the ear archive according to its uri. Default is false.
- altDeploymentDescriptor - sets the alternative deployment descriptor for this module.
- moduleId - sets the id of the module in the generated application.xml.
If you need to map a custom artifact type to one of those types, use the customArtifactTypeMappings.
For instance, to map a custom 'my-rar' to the 'rar' standard artifact's type, add the following to the pom's configuration:
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ear-plugin</artifactId>
<version>2.6</version>
<configuration>
<artifactTypeMappings>
<artifactTypeMapping type="my-rar" mapping="rar"/>
</artifactTypeMappings>
</configuration>
</plugin>
</plugins>
</build>