GWTMaven-1.6fromSCM

Required

  • Java 1.5.x
  • Eclipse 3.3 or higher
  • Maven 2.1 or higher
  • Maven Plugin for Eclipse (version?)
  • GWT environment for Eclipse (although we don't use most of it)
  • Eclipse Plugin appropriate for your SCM

Workspace Setup

If this is the first time the workspace has been used with Maven, follow the steps on the page MavenEclipseWorkspaceSetup.

Steps

This example uses Subversion as the SCM, but I expect other SCMs would be similar.

  • From Eclipse: "File -> New -> Project".
  • In the "New Project" wizard, choose "Maven -> Checkout Maven Projects from SCM"
  • For Subversion, I completed the dialog as follows:
mavenProjectFromSCM.png

Setup Launch Configuration (Hosted Mode)

  • To run the project in hosted mode, add a launch configuration starting with the Java Application template. There are three tabs that need modification:
  1. Main
  2. Arguments
  3. Classpath

Each are shown below.

Main Tab

  • The main class is the GWT hosted mode entry point (com.google.gwt.dev.HostedMode).
mavenRunConfig-Main.png

Arguments Tab

  • Arguments for pasting:
-logLevel INFO
-war .
-startupUrl showRoutes/showRoutes.html
com.jettmarks.gmaps.showRoutes
  • The workspace is significant.
mavenRunConfig-Args.png

Classpath Tab

  • The gwt-dev jar is added from the plugins directory under Eclipse Home directory. (This is the main reason we load the plugin from Google for GWT: so we can run hosted mode.)
  • The source directories are added because I believe the plugin needs these to be here. The main entry point class doesn't appear to be picked up otherwise. Use the "Advanced" button to add folders from the src/main tree.
mavenRunConfig-Classpath.png

Javadoc Generation

  • Setup a Launch configuration starting with "Maven Build" and add the goal "javadoc:javadoc" for the "workspace_loc/<project>" base (source) directory.
  • If you don't want to use the default /site directory, you can change this by editing the "Output Directory" of the "Reporting" section of the POM.
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License