Author: epunzalan Date: Mon Jul 31 10:02:12 2006 New Revision: 427173 URL: http://svn.apache.org/viewvc?rev=427173&view=rev Log: PR: MEAR-32
Updated site documentations - updated pom.xml - separated the usage examples into separate example pages - added an faq page Added: maven/plugins/trunk/maven-ear-plugin/src/site/apt/examples/ maven/plugins/trunk/maven-ear-plugin/src/site/apt/examples/customizing-a-module-filename.apt maven/plugins/trunk/maven-ear-plugin/src/site/apt/examples/customizing-context-root.apt maven/plugins/trunk/maven-ear-plugin/src/site/apt/examples/customizing-module-location.apt maven/plugins/trunk/maven-ear-plugin/src/site/apt/examples/customizing-module-uri.apt maven/plugins/trunk/maven-ear-plugin/src/site/apt/examples/excluding-a-module.apt maven/plugins/trunk/maven-ear-plugin/src/site/apt/examples/including-a-third-party-library-in-application-xml.apt maven/plugins/trunk/maven-ear-plugin/src/site/apt/examples/specifying-security-roles-for-the-generated-application-xml.apt maven/plugins/trunk/maven-ear-plugin/src/site/apt/index.apt maven/plugins/trunk/maven-ear-plugin/src/site/apt/modules.apt maven/plugins/trunk/maven-ear-plugin/src/site/apt/usage.apt - copied, changed from r425933, maven/plugins/trunk/maven-ear-plugin/src/site/apt/howto.apt maven/plugins/trunk/maven-ear-plugin/src/site/fml/ maven/plugins/trunk/maven-ear-plugin/src/site/fml/faq.fml Removed: maven/plugins/trunk/maven-ear-plugin/src/site/apt/howto.apt maven/plugins/trunk/maven-ear-plugin/src/site/apt/introduction.apt Modified: maven/plugins/trunk/maven-ear-plugin/pom.xml maven/plugins/trunk/maven-ear-plugin/src/site/site.xml Modified: maven/plugins/trunk/maven-ear-plugin/pom.xml URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ear-plugin/pom.xml?rev=427173&r1=427172&r2=427173&view=diff ============================================================================== --- maven/plugins/trunk/maven-ear-plugin/pom.xml (original) +++ maven/plugins/trunk/maven-ear-plugin/pom.xml Mon Jul 31 10:02:12 2006 @@ -2,67 +2,20 @@ <parent> <artifactId>maven-plugins</artifactId> <groupId>org.apache.maven.plugins</groupId> - <version>1</version> + <version>2-SNAPSHOT</version> </parent> <modelVersion>4.0.0</modelVersion> <artifactId>maven-ear-plugin</artifactId> <packaging>maven-plugin</packaging> <name>Maven Ear plugin</name> <version>2.3-SNAPSHOT</version> + <prerequisites> + <maven>2.0</maven> + </prerequisites> <issueManagement> <system>JIRA</system> <url>http://jira.codehaus.org/browse/MEAR</url> </issueManagement> - <mailingLists> - <!-- duplication from maven-plugins pom - temporary until they inherit properly --> - <mailingList> - <name>Maven User List</name> - <subscribe>[EMAIL PROTECTED]</subscribe> - <unsubscribe>[EMAIL PROTECTED]</unsubscribe> - <post>users@maven.apache.org</post> - <archive>http://mail-archives.apache.org/mod_mbox/maven-users</archive> - <otherArchives> - <otherArchive>http://www.mail-archive.com/users@maven.apache.org/</otherArchive> - <otherArchive>http://www.nabble.com/Maven---Users-f178.html</otherArchive> - </otherArchives> - </mailingList> - <mailingList> - <name>Maven Developer List</name> - <subscribe>[EMAIL PROTECTED]</subscribe> - <unsubscribe>[EMAIL PROTECTED]</unsubscribe> - <post>dev@maven.apache.org</post> - <archive>http://mail-archives.apache.org/mod_mbox/maven-dev</archive> - </mailingList> - <mailingList> - <name>Maven Commits List</name> - <subscribe>[EMAIL PROTECTED]</subscribe> - <unsubscribe>[EMAIL PROTECTED]</unsubscribe> - <post>commits@maven.apache.org</post> - <archive>http://mail-archives.apache.org/mod_mbox/maven-dev</archive> - </mailingList> - <!-- duplication from maven-parent pom - temporary until they inherit properly --> - <mailingList> - <name>Maven Announcements List</name> - <post>announce@maven.apache.org</post> - <subscribe>[EMAIL PROTECTED]</subscribe> - <unsubscribe>[EMAIL PROTECTED]</unsubscribe> - <archive>http://mail-archives.apache.org/mod_mbox/maven-announce/</archive> - </mailingList> - <mailingList> - <name>Maven Issues List</name> - <post>issues@maven.apache.org</post> - <subscribe>[EMAIL PROTECTED]</subscribe> - <unsubscribe>[EMAIL PROTECTED]</unsubscribe> - <archive>http://mail-archives.apache.org/mod_mbox/maven-issues/</archive> - </mailingList> - <mailingList> - <name>Maven Notifications List</name> - <post>notifications@maven.apache.org</post> - <subscribe>[EMAIL PROTECTED]</subscribe> - <unsubscribe>[EMAIL PROTECTED]</unsubscribe> - <archive>http://mail-archives.apache.org/mod_mbox/maven-notifications/</archive> - </mailingList> - </mailingLists> <dependencies> <dependency> <groupId>org.apache.maven</groupId> Added: maven/plugins/trunk/maven-ear-plugin/src/site/apt/examples/customizing-a-module-filename.apt URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ear-plugin/src/site/apt/examples/customizing-a-module-filename.apt?rev=427173&view=auto ============================================================================== --- maven/plugins/trunk/maven-ear-plugin/src/site/apt/examples/customizing-a-module-filename.apt (added) +++ maven/plugins/trunk/maven-ear-plugin/src/site/apt/examples/customizing-a-module-filename.apt Mon Jul 31 10:02:12 2006 @@ -0,0 +1,50 @@ + ------ + Customizing A Module Filename + ------ + Stephane Nicoll + <[EMAIL PROTECTED]> + ------ + 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 + + +Customizing A Module Filename + + The example below shows how to rename a module being placed in the EAR file: + ++-------- + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-ear-plugin</artifactId> + <configuration> + [...] + <modules> + <javaModule> + <groupId>artifactGroupId</groupId> + <artifactId>artifactId</artifactId> + <bundleFileName>anotherName-1.2.3.jar</bundleFileName> + </javaModule> + </modules> + </configuration> + </plugin> + </plugins> + </build> ++--------- Added: maven/plugins/trunk/maven-ear-plugin/src/site/apt/examples/customizing-context-root.apt URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ear-plugin/src/site/apt/examples/customizing-context-root.apt?rev=427173&view=auto ============================================================================== --- maven/plugins/trunk/maven-ear-plugin/src/site/apt/examples/customizing-context-root.apt (added) +++ maven/plugins/trunk/maven-ear-plugin/src/site/apt/examples/customizing-context-root.apt Mon Jul 31 10:02:12 2006 @@ -0,0 +1,51 @@ + ------ + Customizing The Context Root + ------ + Stephane Nicoll + <[EMAIL PROTECTED]> + ------ + 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 + + +Customizing The Context Root + + The sample below shows how to customize the context root of an artifact to be + placed in the EAR file: + ++-------- + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-ear-plugin</artifactId> + <configuration> + [...] + <modules> + <webModule> + <groupId>artifactGroupId</groupId> + <artifactId>artifactId</artifactId> + <contextRoot>/custom-context-root</contextRoot> + </webModule> + </modules> + </configuration> + </plugin> + </plugins> + </build> ++--------- Added: maven/plugins/trunk/maven-ear-plugin/src/site/apt/examples/customizing-module-location.apt URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ear-plugin/src/site/apt/examples/customizing-module-location.apt?rev=427173&view=auto ============================================================================== --- maven/plugins/trunk/maven-ear-plugin/src/site/apt/examples/customizing-module-location.apt (added) +++ maven/plugins/trunk/maven-ear-plugin/src/site/apt/examples/customizing-module-location.apt Mon Jul 31 10:02:12 2006 @@ -0,0 +1,81 @@ + ------ + Customizing A Module Location + ------ + Stephane Nicoll + <[EMAIL PROTECTED]> + ------ + 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 + + +Customizing A Module Location + + The example below shows how to place a library in the APP-INF/lib directory of + the EAR file: + ++-------- + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-ear-plugin</artifactId> + <configuration> + [...] + <modules> + <javaModule> + <groupId>artifactGroupId</groupId> + <artifactId>artifactId</artifactId> + <bundleDir>APP-INF/lib</bundleDir> + </javaModule> + </modules> + </configuration> + </plugin> + </plugins> + </build> ++--------- + + Note that it is possible to specify a default bundle directory for all Java + modules. If a Java module has not the bundleDir property above, the default + one is used. Below is an example of such configuration: + ++-------- + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-ear-plugin</artifactId> + <configuration> + [...] + <defaultJavaBundleDir>APP-INF/lib</defaultJavaBundleDir> + <modules> + <javaModule> + <groupId>artifactGroupId</groupId> + <artifactId>artifactId</artifactId> + <bundleDir>/</bundleDir> + </javaModule> + </modules> + </configuration> + </plugin> + </plugins> + </build> ++--------- + + In the above case, Java modules will be placed in the APP-INF/lib directory + except the specified artifact which will be placed at the root of the EAR + structure. Added: maven/plugins/trunk/maven-ear-plugin/src/site/apt/examples/customizing-module-uri.apt URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ear-plugin/src/site/apt/examples/customizing-module-uri.apt?rev=427173&view=auto ============================================================================== --- maven/plugins/trunk/maven-ear-plugin/src/site/apt/examples/customizing-module-uri.apt (added) +++ maven/plugins/trunk/maven-ear-plugin/src/site/apt/examples/customizing-module-uri.apt Mon Jul 31 10:02:12 2006 @@ -0,0 +1,52 @@ + ------ + Customizing A Module URI + ------ + Stephane Nicoll + <[EMAIL PROTECTED]> + ------ + 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 + + +Customizing A Module URI + + This is actually a combination of customizing the module's location and file + name. The sample below shows how to specify the URI of a module being placed + in the EAR file: + ++-------- + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-ear-plugin</artifactId> + <configuration> + [...] + <modules> + <javaModule> + <groupId>artifactGroupId</groupId> + <artifactId>artifactId</artifactId> + <uri>APP-INF/lib/anotherName-1.2.3.jar</uri> + </javaModule> + </modules> + </configuration> + </plugin> + </plugins> + </build> ++--------- Added: maven/plugins/trunk/maven-ear-plugin/src/site/apt/examples/excluding-a-module.apt URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ear-plugin/src/site/apt/examples/excluding-a-module.apt?rev=427173&view=auto ============================================================================== --- maven/plugins/trunk/maven-ear-plugin/src/site/apt/examples/excluding-a-module.apt (added) +++ maven/plugins/trunk/maven-ear-plugin/src/site/apt/examples/excluding-a-module.apt Mon Jul 31 10:02:12 2006 @@ -0,0 +1,51 @@ + ------ + Excluding A Module + ------ + Stephane Nicoll + <[EMAIL PROTECTED]> + ------ + 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 + + +Excluding A Module + + If for some reason a dependency which is declared in the pom of the project needs to be + excluded, the excluded flag could be used as follows: + ++-------- + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-ear-plugin</artifactId> + <configuration> + [...] + <modules> + <javaModule> + <groupId>artifactGroupId</groupId> + <artifactId>artifactId</artifactId> + <excluded>true</excluded> + </javaModule> + </modules> + </configuration> + </plugin> + </plugins> + </build> ++--------- Added: maven/plugins/trunk/maven-ear-plugin/src/site/apt/examples/including-a-third-party-library-in-application-xml.apt URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ear-plugin/src/site/apt/examples/including-a-third-party-library-in-application-xml.apt?rev=427173&view=auto ============================================================================== --- maven/plugins/trunk/maven-ear-plugin/src/site/apt/examples/including-a-third-party-library-in-application-xml.apt (added) +++ maven/plugins/trunk/maven-ear-plugin/src/site/apt/examples/including-a-third-party-library-in-application-xml.apt Mon Jul 31 10:02:12 2006 @@ -0,0 +1,51 @@ + ------ + Including A Third Party Library In application.xml + ------ + Stephane Nicoll + <[EMAIL PROTECTED]> + ------ + 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 + + +Including A Third Party Library In application.xml + + If third party libraries need to be included in the generated application.xml, the + 'includeInApplicationXml' flag could be used. This flag works only for java modules. + ++-------- + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-ear-plugin</artifactId> + <configuration> + [...] + <modules> + <javaModule> + <groupId>artifactGroupId</groupId> + <artifactId>artifactId</artifactId> + <includeInApplicationXml>true</includeInApplicationXml> + </javaModule> + </modules> + </configuration> + </plugin> + </plugins> + </build> ++--------- Added: maven/plugins/trunk/maven-ear-plugin/src/site/apt/examples/specifying-security-roles-for-the-generated-application-xml.apt URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ear-plugin/src/site/apt/examples/specifying-security-roles-for-the-generated-application-xml.apt?rev=427173&view=auto ============================================================================== --- maven/plugins/trunk/maven-ear-plugin/src/site/apt/examples/specifying-security-roles-for-the-generated-application-xml.apt (added) +++ maven/plugins/trunk/maven-ear-plugin/src/site/apt/examples/specifying-security-roles-for-the-generated-application-xml.apt Mon Jul 31 10:02:12 2006 @@ -0,0 +1,52 @@ + ------ + Specifying Security Roles For The Generated application.xml + ------ + Stephane Nicoll + <[EMAIL PROTECTED]> + ------ + 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 + + +Specifying Security Roles For The Generated application.xml + + Security roles might be specified as follows + ++-------- + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-ear-plugin</artifactId> + <configuration> + [...] + <security> + <security-role id="SecurityRole_1234"> + <role-name>manager</role-name> + </security-role> + <security-role id="SecurityRole_5678"> + <description>My cool description</description> + <role-name id="RoleName_12">teller</role-name> + </security-role> + </security> + </configuration> + </plugin> + </plugins> + </build> ++--------- Added: maven/plugins/trunk/maven-ear-plugin/src/site/apt/index.apt URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ear-plugin/src/site/apt/index.apt?rev=427173&view=auto ============================================================================== --- maven/plugins/trunk/maven-ear-plugin/src/site/apt/index.apt (added) +++ maven/plugins/trunk/maven-ear-plugin/src/site/apt/index.apt Mon Jul 31 10:02:12 2006 @@ -0,0 +1,94 @@ + ------ + Introduction + ------ + Edwin Punzalan + Stephane Nicoll + ------ + 27 July 2006 + ------ + +~~ 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 + + +Maven EAR Plugin + + This plugin generates J2EE Enterprise Archive (EAR) file. It can also generate + the deployment descriptor file (e.g. application.xml). + + The EAR plugin supports the following artifacts: + + * ejb + + * war + + * jar + + * ejb-client + + * rar + + * ejb3 + + * par + + * sar + + * wsr + + [] + + For available configuration options for these artifacts, please see the + {{{modules.html}modules configuration}}. + + For more information about the J2EE technology, please visit + {{http://java.sun.com/developer/technicalArticles/J2EE/Intro}}. + +* Goals Overview + + EAR Plugin has two goals: + + * {{{ear-mojo.html}ear:ear}} generates J2EE Enterprise Archive (EAR) files. + + * {{{generate-application-xml-mojo.html}ear:generate-application-xml}} + generates the application.xml deployment descriptor file. + +* Usage + + Instructions on how to use the EAR Plugin can be found {{{usage.html}here}}. + +* Examples + + To provide you with better understanding on some usages of the EAR Plugin, + you can take a look into the following examples: + + * {{{examples/customizing-a-module-filename.html}Customizing A Module + Filename}} + + * {{{examples/customizing-context-root.html}Customizing The Context Root}} + + * {{{examples/customizing-module-location.html}Customizing A Module Location}} + + * {{{examples/customizing-module-uri.html}Customizing A Module URI}} + + * {{{examples/excluding-a-module.html}Excluding A Module}} + + * {{{examples/including-a-third-party-library-in-application-xml.html} + Including A Third Party Library In application.xml}} + + * {{{examples/specifying-security-roles-for-the-generated-application-xml.html} + Specifying Security Roles For The Generated application.xml}} Added: maven/plugins/trunk/maven-ear-plugin/src/site/apt/modules.apt URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ear-plugin/src/site/apt/modules.apt?rev=427173&view=auto ============================================================================== --- maven/plugins/trunk/maven-ear-plugin/src/site/apt/modules.apt (added) +++ maven/plugins/trunk/maven-ear-plugin/src/site/apt/modules.apt Mon Jul 31 10:02:12 2006 @@ -0,0 +1,285 @@ + ------ + EAR Modules + ------ + Edwin Punzalan + ------ + 31 July 2006 + ------ + +~~ 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 + + +EAR Modules + + The EAR Plugin supports additional configurations of the following modules: + + * {{{#Ejb3Module}Ejb3Module}} + + * {{{#EjbClientModule}EjbClientModule}} + + * {{{#EjbModule}EjbModule}} + + * {{{#JavaModule}JavaModule}} + + * {{{#ParModule}ParModule}} + + * {{{#RarModule}RarModule}} + + * {{{#SarModule}SarModule}} + + * {{{#WebModule}WebModule}} + + * {{{#WsrModule}WsrModule}} + + [] + + 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> + <configuration> + <modules> + <EjbModule> + <!-- property configurations goes here --> + </EjbModule> + </modules> + </configuration> + </plugin> + [...] +</project> ++----- + +* {Ejb3Module} Properties + + The following configuration options are available for Ejb3Module: + + * <<groupId>> - sets the groupId of the ejb3 artifact you want to configure. + + * <<artifactId>> - sets the artifactId of the ejb3 artifact you want to + configure. + + * <<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. + + +* {EjbClientModule} Properties + + 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. + + * <<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. + + +* {EjbModule} Properties + + 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. + + * <<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. + + +* {JavaModule} Properties + + The following configuration options are available for JavaModule: + + * <<groupId>> - sets the groupId of the ejb artifact you want to + configure. + + * <<artifactId>> - sets the artifactId of the ejb artifact you want to + configure. + + * <<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. + + * <<includeInApplicationXml>> - set to true to if you want to generate an entry + of this module in <<<application.xml>>>. Default is false. + + +* {ParModule} Properties + + The following configuration options are available for ParModule: + + * <<groupId>> - sets the groupId of the ejb artifact you want to + configure. + + * <<artifactId>> - sets the artifactId of the ejb artifact you want to + configure. + + * <<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. + + +* {RarModule} Properties + + The following configuration options are available for RarModule: + + * <<groupId>> - sets the groupId of the ejb artifact you want to + configure. + + * <<artifactId>> - sets the artifactId of the ejb artifact you want to + configure. + + * <<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. + + +* {SarModule} Properties + + The following configuration options are available for SarModule: + + * <<groupId>> - sets the groupId of the ejb artifact you want to + configure. + + * <<artifactId>> - sets the artifactId of the ejb artifact you want to + configure. + + * <<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. + + +* {WebModule} Properties + + The following configuration options are available for WebModule: + + * <<groupId>> - sets the groupId of the ejb artifact you want to + configure. + + * <<artifactId>> - sets the artifactId of the ejb artifact you want to + configure. + + * <<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. + + * <<contextRoot>> - sets the context root of this web artifact. + + +* {WsrModule} Properties + + The following configuration options are available for WsrModule: + + * <<groupId>> - sets the groupId of the ejb artifact you want to + configure. + + * <<artifactId>> - sets the artifactId of the ejb artifact you want to + configure. + + * <<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. + Copied: maven/plugins/trunk/maven-ear-plugin/src/site/apt/usage.apt (from r425933, maven/plugins/trunk/maven-ear-plugin/src/site/apt/howto.apt) URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ear-plugin/src/site/apt/usage.apt?p2=maven/plugins/trunk/maven-ear-plugin/src/site/apt/usage.apt&p1=maven/plugins/trunk/maven-ear-plugin/src/site/apt/howto.apt&r1=425933&r2=427173&rev=427173&view=diff ============================================================================== --- maven/plugins/trunk/maven-ear-plugin/src/site/apt/howto.apt (original) +++ maven/plugins/trunk/maven-ear-plugin/src/site/apt/usage.apt Mon Jul 31 10:02:12 2006 @@ -1,245 +1,101 @@ - ------ - Maven 2 Ear Plugin: configuration examples - ------ - Stephane Nicoll - <[EMAIL PROTECTED]> - ------ - September 23, 2005 + ------ + Configuration and Usage + ------ + Stephane Nicoll + <[EMAIL PROTECTED]> + ------ + September 23, 2005 -Introduction +~~ 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. - 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 {{{index.html}the goals description}}. +~~ NOTE: For help with the syntax of this file, see: +~~ http://maven.apache.org/guides/mini/guide-apt-format.html - Any Ear module might be further customized as follows: - * bundleDir: the directory in the EAR structure where the artifact will be stored +Configuration and Usage - * bundleFileName: the name of the artifact in the EAR structure +* Introduction - * uri: the complete path in the EAR structure for the artifact + 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}}. - * excluded: excludes the artifact from the generated ear +* Configuring the EAR Plugin - The context root of a Web module might be customized using the contextRoot parameter. + The configuration of the EAR Plugin is not any different with the configuration + of the other plugins. The configuration should be similar to: - Please note that third party libraries are not included in the generated - application.xml (only ejb-client should be included in a <java> entry). However, a - jar dependency could be included in the generated application.xml by specifying the - includeInApplicationXml flag. - - It is also possible to specify a default bundle directory for all third party libraries. - - The security settings might be specified under the security parameter. - -Customizing the context root - - The sample below shows how to customize the context root of an artifact to be placed - in the EAR file: - -+-------- - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-ear-plugin</artifactId> - <configuration> - [...] - <modules> - <webModule> - <groupId>artifactGroupId</groupId> - <artifactId>artifactId</artifactId> - <contextRoot>/custom-context-root</contextRoot> - </webModule> - </modules> - </configuration> - </plugin> - </plugins> - </build> -+--------- - -Customizing a module location - - The sample below shows how to place a library in the APP-INF/lib directory of the EAR file: - -+-------- - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-ear-plugin</artifactId> - <configuration> - [...] - <modules> - <javaModule> - <groupId>artifactGroupId</groupId> - <artifactId>artifactId</artifactId> - <bundleDir>APP-INF/lib</bundleDir> - </javaModule> - </modules> - </configuration> - </plugin> - </plugins> - </build> -+--------- - - Note that it is possible to specify a default bundle directory for all Java modules. If a Java module - has not the bundleDir property above, the default one is used. Here is an example of such configuration: - -+-------- ++----- +<project> + [...] <build> + [...] <plugins> + [...] <plugin> - <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-ear-plugin</artifactId> <configuration> - [...] - <defaultJavaBundleDir>APP-INF/lib</defaultJavaBundleDir> - <modules> - <javaModule> - <groupId>artifactGroupId</groupId> - <artifactId>artifactId</artifactId> - <bundleDir>/</bundleDir> - </javaModule> - </modules> + <!-- configuration elements goes here --> </configuration> </plugin> - </plugins> - </build> -+--------- + [...] +</project> ++----- - In this case, all Java modules will be placed in the APP-INF/lib directory except the specified artifact - which will be placed at the root of the EAR structure. + When configuring the EAR Plugin in your pom.xml, you do not declare any + \<executions\> elements in it because it is always invoked at least once + during the package phase of an <<<ear>>> project. -Customizing a module file name +* Executing and Generating your EAR Package - The sample below shows how to rename a module being placed in the EAR file: - -+-------- - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-ear-plugin</artifactId> - <configuration> - [...] - <modules> - <javaModule> - <groupId>artifactGroupId</groupId> - <artifactId>artifactId</artifactId> - <bundleFileName>anotherName-1.2.3.jar</bundleFileName> - </javaModule> - </modules> - </configuration> - </plugin> - </plugins> - </build> -+--------- + The EAR Plugin replaces the Jar Plugin when your project \<packaging\> is + <<<ear>>>. So to generate your EAR package, you need only call the package + phase like so: -Customizing a module uri ++----- +mvn package ++----- - This is actually a combination of customizing the module's location and file - name. The sample below shows how to specify the URI of a module being placed - in the EAR file: +* Advanced Configuration -+-------- - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-ear-plugin</artifactId> - <configuration> - [...] - <modules> - <javaModule> - <groupId>artifactGroupId</groupId> - <artifactId>artifactId</artifactId> - <uri>APP-INF/lib/anotherName-1.2.3.jar</uri> - </javaModule> - </modules> - </configuration> - </plugin> - </plugins> - </build> -+--------- + Any EAR module might be further customized as follows: -Excluding a module + * <<bundleDir>>: the directory in the EAR structure where the artifact will be + stored. - If for some reason a dependency which is declared in the pom of the project needs to be - excluded, the excluded flag could be used as follows: + * <<bundleFileName>>: the name of the artifact in the EAR structure. -+-------- - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-ear-plugin</artifactId> - <configuration> - [...] - <modules> - <javaModule> - <groupId>artifactGroupId</groupId> - <artifactId>artifactId</artifactId> - <excluded>true</excluded> - </javaModule> - </modules> - </configuration> - </plugin> - </plugins> - </build> -+--------- + * <<uri>>: the complete path in the EAR structure for the artifact. -Including a third party library in the generated application.xml + * <<excluded>>: excludes the artifact from the generated ear. - If third party libraries need to be included in the generated application.xml, the - 'includeInApplicationXml' flag could be used. This flag works only for java modules. + The context root of a Web module might be customized using the contextRoot + parameter. -+-------- - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-ear-plugin</artifactId> - <configuration> - [...] - <modules> - <javaModule> - <groupId>artifactGroupId</groupId> - <artifactId>artifactId</artifactId> - <includeInApplicationXml>true</includeInApplicationXml> - </javaModule> - </modules> - </configuration> - </plugin> - </plugins> - </build> -+--------- + Please note that third party libraries are not included in the generated + application.xml (only ejb-client should be included in a <java> entry). + However, a jar dependency could be included in the generated application.xml + by specifying the <<<includeInApplicationXml>>> flag. + It is also possible to specify a default bundle directory for all third party + libraries. -Specifying security roles for the generated application.xml + The security settings might be specified under the security parameter. - Security roles might be specified as follows + For more information on EAR modules, please see the + {{{modules.html}modules configuration}} page. -+-------- - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-ear-plugin</artifactId> - <configuration> - [...] - <security> - <security-role id="SecurityRole_1234"> - <role-name>manager</role-name> - </security-role> - <security-role id="SecurityRole_5678"> - <description>My cool description</description> - <role-name id="RoleName_12">teller</role-name> - </security-role> - </security> - </configuration> - </plugin> - </plugins> - </build> -+--------- + You can take a look at the examples for more information on these advanced + configurations. Added: maven/plugins/trunk/maven-ear-plugin/src/site/fml/faq.fml URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ear-plugin/src/site/fml/faq.fml?rev=427173&view=auto ============================================================================== --- maven/plugins/trunk/maven-ear-plugin/src/site/fml/faq.fml (added) +++ maven/plugins/trunk/maven-ear-plugin/src/site/fml/faq.fml Mon Jul 31 10:02:12 2006 @@ -0,0 +1,44 @@ +<?xml version="1.0"?> + +<!-- + ~ 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. + --> + +<faqs id="FAQ" title="Frequently Asked Questions"> + <part id="General"> + <faq id="what-is-ear"> + <question>What is an EAR archive?</question> + <answer> + <p> + An EAR archive is used to deploy standalone EJBs, usually separated from the web application. Thus, there is no + need for a web application to access these EJBs. The EJBs are still accessible though using EJB clients. + </p> + </answer> + </faq> + <faq id="har-files"> + <question> + The EAR Plugin throws an exception when encountering artifact files it is unfamiliar with, i.e. JBoss' har files. + How does one handle this? + </question> + <answer> + <p> + Apparently, the EAR Plugin must be able to recognize an artifact in order to configure it. If you know archives + which are not supported by the EAR Plugin, please file an issue in + <a href="http://jira.codehaus.org/browse/MEAR">jira</a>. + </p> + </answer> + </faq> + </part> +</faqs> Modified: maven/plugins/trunk/maven-ear-plugin/src/site/site.xml URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ear-plugin/src/site/site.xml?rev=427173&r1=427172&r2=427173&view=diff ============================================================================== --- maven/plugins/trunk/maven-ear-plugin/src/site/site.xml (original) +++ maven/plugins/trunk/maven-ear-plugin/src/site/site.xml Mon Jul 31 10:02:12 2006 @@ -1,26 +1,24 @@ <?xml version="1.0" encoding="ISO-8859-1"?> <!-- -/* - * Copyright 2001-2005 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. - */ ---> + ~ 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. + --> -<project name="Maven Ear Plugin"> +<project name="Maven EAR Plugin"> <bannerLeft> - <name>Maven Ear Plugin</name> + <name>Maven EAR Plugin</name> <src>http://maven.apache.org/images/apache-maven-project.png</src> <href>http://maven.apache.org/</href> </bannerLeft> @@ -29,13 +27,28 @@ </bannerRight> <body> <links> - <item name="Maven 2" href="http://maven.apache.org/maven2/"/> + <item name="Maven" href="http://maven.apache.org/maven2/"/> </links> <menu name="Overview"> - <item name="Introduction" href="introduction.html"/> - <item name="How to Use" href="howto.html"/> + <item name="Introduction" href="index.html"/> + <item name="Goals" href="plugin-info.html"/> + <item name="Usage" href="usage.html"/> + <item name="Modules" href="modules.html"/> + <item name="FAQ" href="faq.html"/> </menu> + + <menu name="Examples"> + <item name="Customizing A Module Filename" href="examples/customizing-a-module-filename.html"/> + <item name="Customizing The Context Root" href="examples/customizing-context-root.html"/> + <item name="Customizing A Module Location" href="examples/customizing-module-location.html"/> + <item name="Customizing A Module URI" href="examples/customizing-module-uri.html"/> + <item name="Excluding A Module" href="examples/excluding-a-module.html"/> + <item name="Including A Third Party Library In application.xml" href="examples/including-a-third-party-library-in-application-xml.html"/> + <item name="Specifying Security Roles For The Generated application.xml" href="examples/specifying-security-roles-for-the-generated-application-xml.html"/> + </menu> + ${reports} + </body> </project>