------ Module Goals Usage :: Geronimo Plugin for Maven 2 ------ ------ $Rev$ $Date$ ~~ ~~ Licensed to the Apache Software Foundation (ASF) under one ~~ or more contributor license agreements. See the NOTICE file ~~ distributed with this work for additional information ~~ regarding copyright ownership. The ASF licenses this file ~~ to you 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. ~~ Module Goals Usage * configuration <<>> modules can be deployed into a running Geronimo server using the goal. Multiple modules can be specified as maven artifacts in which case they will be retrieved from the local maven repository or a single module can be specified by it's absolute file location. <> Archive files <> be a valid <<>> artifact of the type <<>>, <<>>, <<>> or <<>>. This example shows one module from an absolute file location which will be deployed by setting the <<>> parameter. +----------+ org.apache.geronimo.plugins geronimo-maven-plugin deploy-ears deploy-module /path/to/file/foo.ear /path/to/plan.xml +----------+ This example shows one module from the repository which will be deployed by setting the <<>> parameter. +----------+ org.apache.geronimo.plugins geronimo-maven-plugin deploy-ears deploy-module org.apache.geronimo.testsupport test-ear-j2ee_1.3 1.2 ear /path/to/plan.xml +----------+ Both the parameters, <<>> and <<>> can be specified in the same configuration. <> After all the modules are deployed, they will be started by default. This can be prevented by setting the <<>> parameter to <<>>. This will affect all modules in the same configuration. * Deployment plan An optional plan can be specified using the <<>> parameter (shown in the example above). The application module may already have included in the package a deployment plan or the application is so simple that it may not require any deployment plan. However a basic plan is recommended to set the desired moduleID for the module being deployed. In the absence of a plan, the moduleId is generated which maybe quite difficult to obtain and use for other goals of this plugin like start, stop, and undeploy. Here's an example of a basic plan. The file is <<>> for the <<>> module deployed in the example above. +------------+ org.apache.geronimo.testsupport test-ear-j2ee_1.3 1.2 ear +------------+ This deployment plan will now ensure that the moduleID of the above deployed module will be <<>> * , , configuration The configuration parameters for these goals are the same. The goals can be executed on multiple modules or a single module. Multiple modules can be specified using the <<>> parameter or a single module can be specified using the <<>> parameter. The reference for constructing both these parameters can be found in the deployment plan for the module we deployed earlier. This example shows a module being undeployed by using the <<>> parameter +----------+ org.apache.geronimo.plugins geronimo-maven-plugin undeploy-ear-as-modules undeploy-module org.apache.geronimo.testsupport test-ear-j2ee_1.3 1.2 ear +----------+ This example shows a single module being started by using the <<>> parameter. It is of the format <<>>. +----------+ org.apache.geronimo.plugins geronimo-maven-plugin undeploy-ear-as-moduleId start-module true org.apache.geronimo.testsupport/test-ear-j2ee_1.3/1.2/ear +----------+ Both the parameters, <<>> and <<>> can be specified in the same configuration. * Logging the output Setting the <<>> parameter to <<>> for all these goals will ensure that the output and errors from the goal executions will be captured in a file. The file is located at <<<$\{project.build.directory\}/surefire-reports/.txt>>>. Setting this parameter will also generate an xml file in the surefire format for reporting. The file will be generated at <<<$\{project.build.directory\}/surefire-reports/.xml>>>.