blob: 2924ebda1a0ab40c7b0c135f1a066c826a1821db [file] [log] [blame]
rjrjr@google.com79541462011-06-01 14:45:02 +00001-- Option A: Import your project into Eclipse (recommended) --
2
rjrjr@google.com93310a82011-09-08 13:55:03 +00003Configure Eclipse following the instructions at
4http://code.google.com/p/google-web-toolkit/wiki/WorkingWithMaven#Using_Maven_with_Google_Plugin_for_Eclipse
rjrjr@google.com79541462011-06-01 14:45:02 +00005
6In Eclipse, go to the File menu and choose:
7
8 File -> Import... -> Existing Maven Projects into Workspace
9
10 Select the directory containing this file.
11
12 Click Finish.
13
14You can now browse the project in Eclipse.
15
rchandia@google.comce5a5cf2011-12-08 12:16:22 +000016To launch your web app in GWT development mode (see note below if you
17have gae.home set in settings.xml):
rjrjr@google.com79541462011-06-01 14:45:02 +000018
19 Go to the Run menu item and select Run -> Run as -> Web Application.
20
21 If prompted for which directory to run from, simply select the directory
22 that Eclipse defaults to.
23
24 You can now use the built-in debugger to debug your web app in development mode.
25
26GWT developers (those who build GWT from source) may add their
rjrjr@google.comf7dcdc42011-06-07 15:14:59 +000027gwt-user and gwt-dev projects to this project's class path in order to
28use the built-from-source version of GWT instead of the version
29specified in the POM.
rjrjr@google.com79541462011-06-01 14:45:02 +000030
31 Select the project in the Project explorer and select File > Properties
32
33 Select Java Build Path and click the Projects tab
34
rjrjr@google.comf7dcdc42011-06-07 15:14:59 +000035 Click Add..., select gwt-user and gwt-dev, and click OK
36
37 Still in the Java Build Path dialog, click the Order and Export tab
38
39 Move gwt-dev and gwt-user above Maven Dependencies
rjrjr@google.com73916dd2011-06-01 16:26:16 +000040
41GWT developers can also use tools/scripts/maven_script.sh to push their
42own GWT jars into their local maven repo.
rjrjr@google.com79541462011-06-01 14:45:02 +000043
44-- Option B: Build from the command line with Maven --
45
46If you prefer to work from the command line, you can use Maven to
47build your project (http://maven.apache.org/). You will also need Java
481.6 JDK. Maven uses the supplied 'pom.xml' file which describes
49exactly how to build your project. This file has been tested to work
50against Maven 2.2.1. The following assumes 'mvn' is on your command
rchandia@google.comce5a5cf2011-12-08 12:16:22 +000051line path. Also, see note below if you have gae.home set in settings.xml.
rjrjr@google.com79541462011-06-01 14:45:02 +000052
53To run development mode use the Maven GWT Plugin.
54
55 mvn gwt:run
56
57To compile your project for deployment, just type 'mvn package'.
58
59For a full listing of other goals, visit:
60http://mojo.codehaus.org/gwt-maven-plugin/plugin-info.html
rchandia@google.comce5a5cf2011-12-08 12:16:22 +000061
62-- Important Note:
63
64The gae-maven-plugin requires a locally extracted copy of the App
65Engine SDK in order to run. The gae:unpack goal can do this for you
66automatically, by downloading and extracting the contents of
67com.google.appengine:appengine-java-sdk:zip into your local maven
68repository. The mobilewebapp POM should take care of this, as it
69includes the gae:unpack goal. However, if you have gae.home set in
70your settings.xml, it won't work properly. The gae:unpack goal will
71only work correctly if sdkDir / gae.home are not set. For more info,
72see this bug report
73(https://github.com/maven-gae-plugin/maven-gae-plugin/issues/8)
74against the maven-gae-plugin.