Author: rfscholte
Date: Tue Nov 19 20:43:03 2013
New Revision: 1543566

URL: http://svn.apache.org/r1543566
Log:
[MEAR-88] Improve documentation on combining Eclipse and Maven Integration

Added:
    
maven/plugins/trunk/maven-ear-plugin/src/site/apt/examples/eclipse-and-maven-integration.apt.vm
Modified:
    maven/plugins/trunk/maven-ear-plugin/src/site/site.xml

Added: 
maven/plugins/trunk/maven-ear-plugin/src/site/apt/examples/eclipse-and-maven-integration.apt.vm
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ear-plugin/src/site/apt/examples/eclipse-and-maven-integration.apt.vm?rev=1543566&view=auto
==============================================================================
--- 
maven/plugins/trunk/maven-ear-plugin/src/site/apt/examples/eclipse-and-maven-integration.apt.vm
 (added)
+++ 
maven/plugins/trunk/maven-ear-plugin/src/site/apt/examples/eclipse-and-maven-integration.apt.vm
 Tue Nov 19 20:43:03 2013
@@ -0,0 +1,62 @@
+  ------
+  Eclipse and Maven integration
+  ------
+  Chris Graham
+  Robert Scholte
+  ------
+  November 19, 2013
+
+~~ Copyright 2013 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/doxia/references/apt-format.html
+
+Eclipse and Maven Integration
+
+  This page describes how to integrate an EAR project in Eclipse or 
Eclipse-based IDE <<without>> M2Eclipse support.
+  
+  If you have used <<<mvn eclipse:eclipse>>> to generate the metadata for an 
EAR project, it will want the <<<application.xml>>> file in the 
<<<src/main/application/META-INF>>> directory. 
+
+  If you edit <<<application.xml>>> using the WTP based Application Deployment 
Descriptor editor, it will use the name of the projects (Web, EJB etc) as the 
name of the modules. Here is an example:
+
++------------------------+
+<?xml version="1.0" encoding="UTF-8"?>
+<application xmlns="http://java.sun.com/xml/ns/j2ee"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+             xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee 
http://java.sun.com/xml/ns/j2ee/application_1_4.xsd"; version="1.4">
+  <display-name>FireDragon</display-name>
+  <module>
+    <web>
+      <web-uri>FireDragonWeb.war</web-uri>
+      <context-root>firedragon</context-root>
+    </web>
+  </module>
+</application>
++------------------------+
+
+  Obviously this does not have the typical Maven based version naming 
convention applied to it. This allows us to run the application internally 
within eclipse/rsa using the test environments.
+  When Maven is used to create the ear using <<<mvn package>>>, it will create 
the versionized <<<application.xml>>> file, if told to. 
+  However, by default it will not pick up the generated (versionized) one, it 
will use the existing one in the <<<src/main/application/META-INF>>> directory.
+
+  The solution to resolve this conflict is to have Maven generate the 
<<<application.xml>>> and use the generated one as opposed to the existing one.
+
+  This can be achieved via these two directives:
+
++------------------------+
+  <generateApplicationXml>true</generateApplicationXml>
+  <applicationXml>\${project.build.directory}/application.xml</applicationXml>
++------------------------+
+
+  The first line tells Maven to generate a new <<<application.xml>>> file, by 
default in the target directory.
+  The second line tells Maven to use it.
\ No newline at end of file

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=1543566&r1=1543565&r2=1543566&view=diff
==============================================================================
--- maven/plugins/trunk/maven-ear-plugin/src/site/site.xml (original)
+++ maven/plugins/trunk/maven-ear-plugin/src/site/site.xml Tue Nov 19 20:43:03 
2013
@@ -51,6 +51,7 @@ under the License.
       <item name="Customize file name mapping" 
href="examples/customize-file-name-mapping.html"/>
       <item name="Generating modules ID" 
href="examples/generating-modules-id.html"/>
       <item name="Using JavaEE application clients" 
href="examples/using-app-client.html"/>
+      <item name="Eclipse and Maven Integration" 
href="examples/eclipse-and-maven-integration.html"/>
     </menu>
   </body>
 </project>


Reply via email to