------ Configuration and Usage ------ Stephane Nicoll ------ September 23, 2005 ~~ Copyright 2006 The Apache Software Foundation. ~~ ~~ Licensed under the Apache License, Version 2.0 (the "License"); ~~ you may not use this file except in compliance with the License. ~~ You may obtain a copy of the License at ~~ ~~ http://www.apache.org/licenses/LICENSE-2.0 ~~ ~~ Unless required by applicable law or agreed to in writing, software ~~ distributed under the License is distributed on an "AS IS" BASIS, ~~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ~~ See the License for the specific language governing permissions and ~~ limitations under the License. ~~ NOTE: For help with the syntax of this file, see: ~~ http://maven.apache.org/guides/mini/guide-apt-format.html Configuration and Usage * Introduction The EAR plugin allows to generate automatically the descriptor deployment, e.g. application.xml. This generation is already customized by the goal's parameters, see {{{plugin-info.html}the goals description}}. * Configuring the EAR Plugin The configuration of the EAR Plugin is not any different with the configuration of the other plugins. The configuration should be similar to: +----- [...] [...] [...] maven-ear-plugin [...] +----- When configuring the EAR Plugin in your pom.xml, you do not declare any \ elements in it because it is always invoked at least once during the package phase of an <<>> project. * Executing and Generating your EAR Package The EAR Plugin replaces the Jar Plugin when your project \ is <<>>. So to generate your EAR package, you need only call the package phase like so: +----- mvn package +----- * Advanced Configuration Any EAR module might be further customized as follows: * <>: the directory in the EAR structure where the artifact will be stored. * <>: the name of the artifact in the EAR structure. * <>: the complete path in the EAR structure for the artifact. * <>: excludes the artifact from the generated ear. * <>: unpack the artifact in the generated ear. The context root of a Web module might be customized using the contextRoot parameter. Please note that third party libraries (i.e. JarModule) are not included in the generated application.xml (only ejb-client should be included in a entry). However, a jar dependency could be included in the generated application.xml by specifying the <<>> flag. It is also possible to specify a default bundle directory for all third party libraries by specifying the <<>> parameter. The security settings might be specified under the security parameter. The artifact's types that should be unpacked by default can be specified using the unpackTypes parameter The file name mapping to use for artifacts stored in the EAR can be specified using the <<>> parameter. Valid values for this parameter are <<>> (default) and <<>>. By specifying <<>> as file name mapping, artifacts are prefixed by the <<>> where dots have been replaced by dashes. For more information on EAR modules, please see the {{{modules.html}modules configuration}} page. You can take a look at the examples for more information on these advanced configurations. * JBoss support The EAR plugin can generate the jboss-app.xml automatically. To do so, the 'jboss' element must be configured and takes the following child elements: * <>: the targeted JBoss version to use (3.2 or 4 which is the default). * <>: the JNDI name of the security manager (JBoss 4 only) * <>: the unauthenticated principal (JBoss 4 only) * <>: the object name of the ear mbean. Hibernate archives (HAR) and Service archives (SAR) will be recognized automatically and added the the jboss-app.xml file. You can take a look at the examples for more information on the JBoss support.