You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rave.apache.org by at...@apache.org on 2011/05/30 22:58:58 UTC

svn commit: r1129363 - in /incubator/rave: site/trunk/content/rave/source.mdtext trunk/pom.xml trunk/rave-portal/pom.xml trunk/rave-shindig/pom.xml

Author: ate
Date: Mon May 30 20:58:57 2011
New Revision: 1129363

URL: http://svn.apache.org/viewvc?rev=1129363&view=rev
Log:
RAVE-5:
- update source building and Eclipse integration documentation for using Eclipse FileSync plugin as alternative for Eclipse WTP
- adding maven-filesync-plugin to provide a useful default configuration for the FileSync plugin

Modified:
    incubator/rave/site/trunk/content/rave/source.mdtext
    incubator/rave/trunk/pom.xml
    incubator/rave/trunk/rave-portal/pom.xml
    incubator/rave/trunk/rave-shindig/pom.xml

Modified: incubator/rave/site/trunk/content/rave/source.mdtext
URL: http://svn.apache.org/viewvc/incubator/rave/site/trunk/content/rave/source.mdtext?rev=1129363&r1=1129362&r2=1129363&view=diff
==============================================================================
--- incubator/rave/site/trunk/content/rave/source.mdtext (original)
+++ incubator/rave/site/trunk/content/rave/source.mdtext Mon May 30 20:58:57 2011
@@ -77,7 +77,6 @@ Once the server is running:
   * Install [Eclipse for Java EE][5]
   * Install M2Eclipse from the [Update Site][6]
   * Install [Subclipse][7]
-  * Install M2Eclipse-extras from the [Update Site][8]
   * File -> Import -> Maven -> Check Out maven project from SCM
     * select SVN
     * URL is https://svn.apache.org/repos/asf/incubator/rave/trunk
@@ -91,36 +90,84 @@ Once the server is running:
     performance drain (Update Maven projects on startup being the
     other).
 
-Now the application is building you probably want to be able to run
-Rave inside of Eclispe. This gives a faster turnaround in the
-edit/build/deploy cycle. This is possible, but it is less than optimal.
-
-We recommend the use of JRebel rather than WTP. It's just
-better. However, it is not free. If you are a committer you can get a
-free licence, but if not you wither need to buy your own licence (you
-can get a free 30 day trial licence) or you need to use the adequate, but
-less functional Eclipse WTP.
-
-For those of you using Eclipse WTP you need to follow these steps:
-
-For those of you using Eclipse WTP you need to follow these steps:
-
-  * Right click on the rave-shindig project and select Properties
-  * Open the "Deployment Assembly" property
-  * Press Add, select Directive Type "Folder", and select the target/rave-shindig-0.1-incubating-SNAPSHOT folder. I had to do a "mvn install" in rave-project for this to be ava$
-  * configure the correct Context root paths for rave-portal
-    ("portal") and rave-shindig ("/") in their Eclipse project
-    properties under "Web Project Settings"
-
-Now we need to add the the two webapps to the server:
-
-  * Windows->Show View->Other...
-  * Server->Servers
-  * OK
-  * In the servers view right click your chosen server and slect Add and Remove...
-  * Add rave-shindig and rave-portal
-  * Start the server
-  * Now see the instructions above for logging into the server
+Now the application is building you probably want to be able to develop and debug
+Rave from inside Eclipse. This gives a faster turnaround in the
+edit/build/deploy cycle.
+
+There are a few different ways to do this:
+
+#### Using Remote debugging and the Eclipse FileSync plugin
+
+The OSS [Eclipse FileSync][8] plugin can automatically synchronize (re)source changes
+(e.g. .jsp, .css, .js) made in the Eclipse IDE directly to the runtime tomcat deployment
+started (separately) through maven cargo:start. And you can attach the Eclipse debugger
+to the cargo started Tomcat instance (see above) as remote application on default port 8000.
+    
+The [maven-filesync-plugin][9] is pre-configured to generate default Eclipse FileSync
+configurations for the rave-shindig and rave-portal projects, mapping their source folders
+src/main/webapps and src/main/resources to synchronize (copy) changes to the Tomcat deployment
+environment under rave-portal/target/Tomcat6x, so this will work out-of-the-box.
+
+Prerequisite: install the Eclipse FileSync plugin from its [Update Site][10]
+    
+The first time you build the Rave project with maven, the maven-filesync-plugin
+will generate this default FileSync configuration for the FileSync plugin.
+Afterwards you only have to refresh the Eclipse projects once to have them recognize this.
+Thereafter you can customize the synchronization configuration manually within Eclipse through
+the project properties dialog.
+Note: manual changes will not be overridden anymore by the maven-filesync-plugin once they
+exist. Furthermore, if you are not using Eclipse, this plugin will simply skip its execution.
+
+If you have "Build automatically" enabled within Eclipse, the FileSync plugin will synchronize
+changes automatically after you saved them in Eclipse. Otherwise you can force a manual
+synchronization from the project (rave-portal or rave-shindig) its context menu actions.
+    
+#### Using Remote debugging with the JRebel plugin
+
+Using [JRebel][11] provides one the best remote debugging and runtime code change synchronizing
+solutions, as well as can handle resource (non-code) change synchronization.
+    
+However, JRebel is not free. If you are a committer you can get a free licence, but if not you
+will need to buy your own licence (you can try out a free 30 day trial licence first).
+
+Setting up and configuring JRebel is not pre-configured for the Rave project but by following
+the instructions from the JRebel manual this should be relatively easy to do.
+
+Note: using both the Eclipse FileSync plugin for (only) resources synchronization and JRebel 
+for the hot-code replacement probably will provide the best combination with the least
+configuration overhead.
+    
+#### Using Eclipse WTP
+The Rave project can also be deployed through Eclipse WTP, and might be adequate for some, but it
+it is less functional and sometimes a bit quirky. Furthermore, because of (current) limitations
+of the m2eclipse WTP integration for maven war overlays (which the rave-shindig project uses),
+you'll need to use some workarounds to make it workable.
+
+Prerequisite: Install m2eclipse-wtp integration from the m2eclipse-extras [Update Site][12]
+
+If you already imported the Rave projects in Eclipse, first remove them (but don't need to delete them)
+and then (re)import the Rave project as Maven projects to get the m2eclipse-wtp integration enabled. 
+
+Then you need to follow these steps:
+
+    * Right click on the rave-shindig project and select Properties
+    * Open the "Deployment Assembly" property
+    * Press Add, select Directive Type "Folder", and select the
+      target/rave-shindig-0.1-incubating-SNAPSHOT folder.
+      (do a "mvn install" in rave-project first for this folder to be available)
+    * configure the correct Context root paths for rave-portal
+      ("portal") and rave-shindig ("/") in their Eclipse project
+      properties under "Web Project Settings"
+
+    Now we need to add the the two webapps to a pre-setup (Tomcat 6) server:
+
+    * Windows->Show View->Other...
+    * Server->Servers
+    * OK
+    * In the servers view right click your chosen server and slect Add and Remove...
+    * Add rave-shindig and rave-portal
+    * Start the server
+    * Now see the instructions above for logging into the server
 
 
   [1]: http://subversion.apache.org
@@ -130,4 +177,9 @@ Now we need to add the the two webapps t
   [5]: http://download.eclipse.org/webtools/downloads/
   [6]: http://m2eclipse.sonatype.org/sites/m2e
   [7]: http://subclipse.tigris.org/update_1.6.x/
-  [8]:  http://m2eclipse.sonatype.org/sites/m2e-extras
\ No newline at end of file
+  [8]: http://andrei.gmxhome.de/filesync/index.html
+  [9]: http://code.google.com/p/mavenfilesync/
+  [10]: http://andrei.gmxhome.de/eclipse/
+  [11]: http://www.zeroturnaround.com/jrebel/how-to-install-jrebel-for-eclipse/
+  [12]: http://m2eclipse.sonatype.org/sites/m2e-extras
+  
\ No newline at end of file

Modified: incubator/rave/trunk/pom.xml
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/pom.xml?rev=1129363&r1=1129362&r2=1129363&view=diff
==============================================================================
--- incubator/rave/trunk/pom.xml (original)
+++ incubator/rave/trunk/pom.xml Mon May 30 20:58:57 2011
@@ -60,6 +60,10 @@
         <org.openid4java.version>0.9.6</org.openid4java.version>
         <jersey-server.version>1.6</jersey-server.version>
         <jersey-spring.version>1.0</jersey-spring.version>
+        
+        <!-- Force maven-filesync-plugin rewrite the Eclipse FileSync plugin configuration with
+            $mvn filesync:generate -Dmaven.filesync.override=true -->
+        <maven.filesync.override>false</maven.filesync.override>
     </properties>
 
     <repositories>
@@ -279,29 +283,44 @@
         </dependency>
     </dependencies>
 
-    <build>
-        <defaultGoal>install</defaultGoal>
+  <build>
+    <defaultGoal>install</defaultGoal>
 
-        <pluginManagement>
-            <plugins>
-                <plugin>
-                    <groupId>org.apache.maven.plugins</groupId>
-                    <artifactId>maven-compiler-plugin</artifactId>
-                    <version>2.3.2</version>
-                    <configuration>
-                        <source>1.6</source>
-                        <target>1.6</target>
-                    </configuration>
-                </plugin>
-                <plugin>
-                    <groupId>org.apache.maven.plugins</groupId>
-                    <artifactId>maven-war-plugin</artifactId>
-                    <version>2.1.1</version>
-                </plugin>
-            </plugins>
-        </pluginManagement>
+    <pluginManagement>
+      <plugins>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-compiler-plugin</artifactId>
+          <version>2.3.2</version>
+          <configuration>
+            <source>1.6</source>
+            <target>1.6</target>
+          </configuration>
+        </plugin>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-war-plugin</artifactId>
+          <version>2.1.1</version>
+        </plugin>
+        <plugin>
+          <groupId>com.googlecode.mavenfilesync</groupId>
+          <artifactId>maven-filesync-plugin</artifactId>
+          <version>1.0.0</version>
+          <configuration>
+            <override>${maven.filesync.override}</override>
+          </configuration>
+          <executions>
+            <execution>
+              <goals>
+                <goal>generate</goal>
+              </goals>
+            </execution>
+          </executions>
+        </plugin>
+      </plugins>
+    </pluginManagement>
 
-    </build>
+  </build>
 
     <modules>
         <module>rave-shindig</module>

Modified: incubator/rave/trunk/rave-portal/pom.xml
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-portal/pom.xml?rev=1129363&r1=1129362&r2=1129363&view=diff
==============================================================================
--- incubator/rave/trunk/rave-portal/pom.xml (original)
+++ incubator/rave/trunk/rave-portal/pom.xml Mon May 30 20:58:57 2011
@@ -180,6 +180,22 @@ if needed you can specify it on the comm
     <build>
        <defaultGoal>install</defaultGoal>
        <plugins>
+      <plugin>
+        <groupId>com.googlecode.mavenfilesync</groupId>
+        <artifactId>maven-filesync-plugin</artifactId>
+        <configuration>
+          <mappings>
+            <mapping>
+              <sourceFolder>src/main/webapp</sourceFolder>
+              <destinationFolder>@target/tomcat6x/webapps/portal</destinationFolder>
+            </mapping>
+            <mapping>
+              <sourceFolder>src/main/resources</sourceFolder>
+              <destinationFolder>@target/tomcat6x/webapps/portal/WEB-INF/classes</destinationFolder>
+            </mapping>
+          </mappings>
+        </configuration>
+      </plugin>
             <plugin>
                 <groupId>org.codehaus.mojo</groupId>
                 <artifactId>openjpa-maven-plugin</artifactId>

Modified: incubator/rave/trunk/rave-shindig/pom.xml
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-shindig/pom.xml?rev=1129363&r1=1129362&r2=1129363&view=diff
==============================================================================
--- incubator/rave/trunk/rave-shindig/pom.xml (original)
+++ incubator/rave/trunk/rave-shindig/pom.xml Mon May 30 20:58:57 2011
@@ -94,6 +94,22 @@
 
     <plugins>
       <plugin>
+        <groupId>com.googlecode.mavenfilesync</groupId>
+        <artifactId>maven-filesync-plugin</artifactId>
+        <configuration>
+          <mappings>
+            <mapping>
+              <sourceFolder>src/main/webapp</sourceFolder>
+              <destinationFolder>@../rave-portal/target/tomcat6x/webapps/ROOT</destinationFolder>
+            </mapping>
+            <mapping>
+              <sourceFolder>src/main/resources</sourceFolder>
+              <destinationFolder>@../rave-portal/target/tomcat6x/webapps/ROOT/WEB-INF/classes</destinationFolder>
+            </mapping>
+          </mappings>
+        </configuration>
+      </plugin>
+      <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-war-plugin</artifactId>
         <configuration>