Revision: 10157
Author:   [email protected]
Date:     Fri May  6 08:20:47 2011
Log:      Eclipse configuration for MobileWebApp.
Relies on AppEngine and GPE
README.txt instructions updated to help setting up Eclipse in this case

Review at http://gwt-code-reviews.appspot.com/1437801

http://code.google.com/p/google-web-toolkit/source/detail?r=10157

Added:
 /trunk/eclipse/samples/MobileWebApp
 /trunk/eclipse/samples/MobileWebApp/.checkstyle
 /trunk/eclipse/samples/MobileWebApp/.classpath
 /trunk/eclipse/samples/MobileWebApp/.project
 /trunk/eclipse/samples/MobileWebApp/.settings
/trunk/eclipse/samples/MobileWebApp/.settings/com.google.appengine.eclipse.core.prefs /trunk/eclipse/samples/MobileWebApp/.settings/com.google.gdt.eclipse.core.prefs
 /trunk/samples/mobilewebapp/user-classpath
 /trunk/samples/mobilewebapp/user-project
 /trunk/samples/mobilewebapp/user-settings
/trunk/samples/mobilewebapp/user-settings/com.google.appengine.eclipse.core.prefs
 /trunk/samples/mobilewebapp/war/WEB-INF/classes
 /trunk/samples/mobilewebapp/war/WEB-INF/classes/marker
Modified:
 /trunk/samples/build.xml
 /trunk/samples/common.ant.xml
 /trunk/samples/expenses/build.xml
 /trunk/samples/mobilewebapp/README.txt
 /trunk/samples/mobilewebapp/build.xml
/trunk/samples/mobilewebapp/src/main/com/google/gwt/sample/mobilewebapp/client/desktop/DesktopTaskListView.java /trunk/samples/mobilewebapp/src/main/com/google/gwt/sample/mobilewebapp/client/mobile/MobileTaskListView.java
 /trunk/samples/mobilewebapp/user-build.xml
 /trunk/samples/mobilewebapp/war/WEB-INF/appengine-web.xml

=======================================
--- /dev/null
+++ /trunk/eclipse/samples/MobileWebApp/.checkstyle     Fri May  6 08:20:47 2011
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<fileset-config file-format-version="1.2.0" simple-config="true">
+ <fileset name="all" enabled="true" check-config-name="GWT Checks" local="false">
+        <file-match-pattern match-pattern="." include-pattern="true"/>
+    </fileset>
+    <filter name="NonSrcDirs" enabled="true"/>
+</fileset-config>
=======================================
--- /dev/null
+++ /trunk/eclipse/samples/MobileWebApp/.classpath      Fri May  6 08:20:47 2011
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+       <classpathentry kind="src" path="core/src/main"/>
+       <classpathentry kind="src" output="build" path="core/src/dev"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> + <classpathentry kind="con" path="com.google.appengine.eclipse.core.GAE_CONTAINER"/> + <classpathentry kind="con" path="com.google.gwt.eclipse.core.GWT_CONTAINER"/>
+
+ <classpathentry kind="var" path="GWT_TOOLS/lib/javax/validation/validation-api-1.0.0.GA.jar" sourcepath="/GWT_TOOLS/lib/javax/validation/validation-api-1.0.0.GA-sources.jar"/> + <classpathentry kind="var" path="GWT_TOOLS/lib/hibernate/validator/hibernate-validator-4.1.0.Final.jar" sourcepath="/GWT_TOOLS/lib/hibernate/validator/hibernate-validator-4.1.0.Final-sources.jar"/> + <classpathentry kind="var" path="GWT_TOOLS/lib/slf4j/slf4j-api/slf4j-api-1.6.1.jar"/> + <classpathentry kind="var" path="GWT_TOOLS/lib/slf4j/slf4j-log4j12/slf4j-log4j12-1.6.1.jar"/> + <classpathentry kind="var" path="GWT_TOOLS/lib/apache/log4j/log4j-1.2.16.jar"/> + <classpathentry kind="var" path="GWT_TOOLS/redist/json/r2_20080312/json-1.5.jar"/>
+       <classpathentry kind="output" path="core/war/WEB-INF/classes"/>
+</classpath>
=======================================
--- /dev/null
+++ /trunk/eclipse/samples/MobileWebApp/.project        Fri May  6 08:20:47 2011
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+       <name>MobileWebApp</name>
+       <comment></comment>
+       <projects>
+       </projects>
+       <buildSpec>
+               <buildCommand>
+                       <name>org.eclipse.jdt.core.javabuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       
<name>com.google.gdt.eclipse.core.webAppProjectValidator</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       
<name>com.google.appengine.eclipse.core.projectValidator</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       
<name>com.google.gwt.eclipse.core.gwtProjectValidator</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       
<name>com.atlassw.tools.eclipse.checkstyle.CheckstyleBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       
<name>com.google.appengine.eclipse.core.enhancerbuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+       </buildSpec>
+       <natures>
+               <nature>org.eclipse.jdt.core.javanature</nature>
+               <nature>com.google.appengine.eclipse.core.gaeNature</nature>
+               <nature>com.google.gwt.eclipse.core.gwtNature</nature>
+               
<nature>com.atlassw.tools.eclipse.checkstyle.CheckstyleNature</nature>
+       </natures>
+       <linkedResources>
+               <link>
+                       <name>core</name>
+                       <type>2</type>
+                       <locationURI>GWT_ROOT/samples/mobilewebapp</locationURI>
+               </link>
+       </linkedResources>
+</projectDescription>
=======================================
--- /dev/null
+++ /trunk/eclipse/samples/MobileWebApp/.settings/com.google.appengine.eclipse.core.prefs Fri May 6 08:20:47 2011
@@ -0,0 +1,3 @@
+#Thu May 05 15:19:25 EDT 2011
+eclipse.preferences.version=1
+ormEnhancementInclusions=core/src/main/
=======================================
--- /dev/null
+++ /trunk/eclipse/samples/MobileWebApp/.settings/com.google.gdt.eclipse.core.prefs Fri May 6 08:20:47 2011
@@ -0,0 +1,5 @@
+#Thu May 05 15:51:11 EDT 2011
+eclipse.preferences.version=1
+jarsExcludedFromWebInfLib=
+warSrcDir=core/war
+warSrcDirIsOutput=true
=======================================
--- /dev/null
+++ /trunk/samples/mobilewebapp/user-classpath  Fri May  6 08:20:47 2011
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+       <classpathentry kind="src" path="src/main"/>
+       <classpathentry kind="src" output="build" path="src/dev"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> + <classpathentry kind="con" path="com.google.appengine.eclipse.core.GAE_CONTAINER"/> + <classpathentry kind="con" path="com.google.gwt.eclipse.core.GWT_CONTAINER"/>
+       <classpathentry kind="output" path="war/WEB-INF/classes"/>
+</classpath>
=======================================
--- /dev/null
+++ /trunk/samples/mobilewebapp/user-project    Fri May  6 08:20:47 2011
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+       <name>MobileWebApp</name>
+       <comment></comment>
+       <projects>
+       </projects>
+       <buildSpec>
+               <buildCommand>
+                       <name>org.eclipse.jdt.core.javabuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       
<name>com.google.gdt.eclipse.core.webAppProjectValidator</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       
<name>com.google.appengine.eclipse.core.projectValidator</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       
<name>com.google.gwt.eclipse.core.gwtProjectValidator</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       
<name>com.google.appengine.eclipse.core.enhancerbuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+       </buildSpec>
+       <natures>
+               <nature>org.eclipse.jdt.core.javanature</nature>
+               <nature>com.google.appengine.eclipse.core.gaeNature</nature>
+               <nature>com.google.gwt.eclipse.core.gwtNature</nature>
+       </natures>
+</projectDescription>
=======================================
--- /dev/null
+++ /trunk/samples/mobilewebapp/user-settings/com.google.appengine.eclipse.core.prefs Fri May 6 08:20:47 2011
@@ -0,0 +1,3 @@
+#Fri Apr 29 15:39:20 EDT 2011
+eclipse.preferences.version=1
+ormEnhancementInclusions=src/main/
=======================================
--- /trunk/samples/build.xml    Wed Apr 20 09:27:14 2011
+++ /trunk/samples/build.xml    Fri May  6 08:20:47 2011
@@ -35,7 +35,7 @@
   </target>

   <target name="mobilewebapp" description="Build mobile web app">
-    <gwt.ant dir="mobilewebapp" target="source" />
+    <gwt.ant dir="mobilewebapp" target="source+libs" />
   </target>

   <target name="showcase" description="Build showcase">
=======================================
--- /trunk/samples/common.ant.xml       Wed Apr 20 09:27:14 2011
+++ /trunk/samples/common.ant.xml       Fri May  6 08:20:47 2011
@@ -66,6 +66,32 @@
         <copy tofile="${sample.build}/build.xml" file="user-build.xml"/>
       </then>
     </if>
+    <if>
+      <available file="user-build.xml"/>
+      <then>
+        <copy tofile="${sample.build}/build.xml" file="user-build.xml"/>
+      </then>
+    </if>
+    <if>
+      <available file="user-project"/>
+      <then>
+        <copy tofile="${sample.build}/.project" file="user-project"/>
+      </then>
+    </if>
+    <if>
+      <available file="user-classpath"/>
+      <then>
+        <copy tofile="${sample.build}/.classpath" file="user-classpath"/>
+      </then>
+    </if>
+    <if>
+      <available file="user-settings"/>
+      <then>
+        <copy todir="${sample.build}/.settings">
+          <fileset dir="user-settings"/>
+        </copy>
+      </then>
+    </if>
   </target>

<target name="serverlibs" description="Copy server libs to the output folder">
=======================================
--- /trunk/samples/expenses/build.xml   Wed Jan 26 10:26:21 2011
+++ /trunk/samples/expenses/build.xml   Fri May  6 08:20:47 2011
@@ -5,10 +5,7 @@
   <import file="../common.ant.xml" />
   <!-- these are after the common.ant.xml so they have gwt.tools... -->
   <path id="sample.extraclasspath">
- <pathelement location="${gwt.tools.lib}/javax/validation/validation-api-1.0.0.GA.jar" /> - <pathelement location="${gwt.tools.lib}/javax/validation/validation-api-1.0.0.GA-sources.jar" />
   </path>
   <fileset id="sample.server.libs" dir="${gwt.tools.lib}">
-    <include name="javax/validation/validation-api-1.0.0.GA-sources.jar" />
   </fileset>
 </project>
=======================================
--- /trunk/samples/mobilewebapp/README.txt      Wed Apr 20 09:27:14 2011
+++ /trunk/samples/mobilewebapp/README.txt      Fri May  6 08:20:47 2011
@@ -26,3 +26,55 @@
 To compile and also bundle into a .war file, type 'ant war'.

 For a full listing of other targets, type 'ant -p'.
+
+-- Building with Eclipse and the Google Plugin for Eclipse --
+
+If you use Eclipse, you can simply import the generated project into
+Eclipse.  We've tested against Eclipse 3.5 and 3.6 and GPE 2.3.  Later
+versions will likely also work, earlier versions may not.
+
+1. In Eclipse, make sure the App Engine SDK is configured in
+
+  Window -> Properties -> Google -> App Engine
+
+2. Go to the File menu and choose:
+
+  File -> Import... -> Existing Projects into Workspace
+
+  Browse to the directory containing this file,
+  select "MobileWebApp".
+
+  Be sure to uncheck "Copy projects into workspace" if it is checked.
+
+  Click Finish.
+
+  You can now browse the project in Eclipse.
+
+3. Eclipse may produce warings indicating that
+
+ "The App Engine SDJ JAR xx.yy.jar is missing in the WEB-INF/lib directory"
+
+  Select the warning, right click and choose
+
+  "Quick fix" -> "Synchronize <WAR>/WEB-INF/lib with SDK libraries"
+
+  Click "Finish"
+
+4. Eclipse may also produce a warning indicating that
+
+  "The GWT SDK JAR gwt-servlet.jar is missing in the WEB-INF/lib directory"
+
+  Select the warning, right click and choose
+
+  "Quick fix" -> "Synchronize <WAR>/WEB-INF/lib with SDK libraries"
+
+  Click "Finish"
+
+5. To launch your web app in GWT development mode, go to the Run menu and choose:
+
+  Run -> Open Debug Dialog...
+
+  Under Java Application, you should find a launch configuration
+  named "MobileWebApp".  Select and click "Debug".
+
+ You can now use the built-in debugger to debug your web app in development mode.
=======================================
--- /trunk/samples/mobilewebapp/build.xml       Wed Apr 27 05:15:56 2011
+++ /trunk/samples/mobilewebapp/build.xml       Fri May  6 08:20:47 2011
@@ -1,11 +1,19 @@
-<project name="mobilewebapp" default="source" basedir=".">
+<project name="mobilewebapp" default="source+libs" basedir=".">
   <property name="sample.root" value="mobilewebapp" />
   <property name="sample.module" value="MobileWebApp" />
-  <property name="sample.path" value="src/main/java" />
+  <property name="sample.path" value="src/main" />
   <import file="../common.ant.xml" />
   <!-- these are after the common.ant.xml so they have gwt.tools... -->
   <path id="sample.extraclasspath">
- <pathelement location="${gwt.tools.lib}/javax/validation/validation-api-1.0.0.GA.jar" /> - <pathelement location="${gwt.tools.lib}/javax/validation/validation-api-1.0.0.GA-sources.jar" />
   </path>
+  <fileset id="sample.server.libs" dir="${gwt.tools}">
+    <include name="lib/javax/validation/validation-api-1.0.0.GA.jar"/>
+ <include name="lib/hibernate/validator/hibernate-validator-4.1.0.Final.jar"/>
+    <include name="lib/slf4j/slf4j-api/slf4j-api-1.6.1.jar"/>
+    <include name="lib/slf4j/slf4j-log4j12/slf4j-log4j12-1.6.1.jar"/>
+    <include name="lib/apache/log4j/log4j-1.2.16.jar"/>
+    <include name="redist/json/r2_20080312/json-1.5.jar"/>
+  </fileset>
+
+  <target name="source+libs" depends="source, serverlibs"/>
 </project>
=======================================
--- /trunk/samples/mobilewebapp/src/main/com/google/gwt/sample/mobilewebapp/client/desktop/DesktopTaskListView.java Tue May 3 10:43:13 2011 +++ /trunk/samples/mobilewebapp/src/main/com/google/gwt/sample/mobilewebapp/client/desktop/DesktopTaskListView.java Fri May 6 08:20:47 2011
@@ -64,8 +64,6 @@

   /**
    * Construct a new {@link DesktopTaskListView}.
-   *
-   * @param presenter the {@link Presenter} that handles this view
    */
   public DesktopTaskListView() {
     // Create the CellTable.
=======================================
--- /trunk/samples/mobilewebapp/src/main/com/google/gwt/sample/mobilewebapp/client/mobile/MobileTaskListView.java Tue May 3 10:43:13 2011 +++ /trunk/samples/mobilewebapp/src/main/com/google/gwt/sample/mobilewebapp/client/mobile/MobileTaskListView.java Fri May 6 08:20:47 2011
@@ -75,8 +75,6 @@

   /**
    * Construct a new {@link MobileTaskListView}.
-   *
-   * @param presenter the {@link Presenter} that handles this view
    */
   public MobileTaskListView() {
     // Create the CellList.
=======================================
--- /trunk/samples/mobilewebapp/user-build.xml  Wed May  4 09:12:17 2011
+++ /trunk/samples/mobilewebapp/user-build.xml  Fri May  6 08:20:47 2011
@@ -142,7 +142,6 @@
     <delete dir="war/WEB-INF/classes/META-INF" failonerror="false" />
<delete file="war/WEB-INF/classes/log4j.properties" failonerror="false" />
     <delete dir="war/WEB-INF/deploy/" failonerror="false" />
-    <delete dir="war/WEB-INF/lib/" failonerror="false" />
     <delete dir="war/mobilewebapp/" failonerror="false" />
     <delete dir="build/" failonerror="false" />
   </target>
=======================================
--- /trunk/samples/mobilewebapp/war/WEB-INF/appengine-web.xml Wed Apr 20 09:27:14 2011 +++ /trunk/samples/mobilewebapp/war/WEB-INF/appengine-web.xml Fri May 6 08:20:47 2011
@@ -1,5 +1,8 @@
 <?xml version="1.0" encoding="utf-8"?>
 <appengine-web-app xmlns="http://appengine.google.com/ns/1.0";>
+  <!-- Fill in the app name and version -->
+  <application></application>
+  <version></version>

   <!-- Configure serving/caching of GWT files -->
   <static-files>

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors

Reply via email to