Reputation: 124
I've successfully refactored my typical GWT 2.7 and AppEngine stacked application from a single Maven module into many - I can compile, run the AppEngine dev server and deploy.
I need some guidance as to configure GWT SuperDevMode using the GWT mojo. Now the client and server components are split into different modules and packaged using a EAR module, I'm unsure where to start.
The project layout looks something like:
/app-client (GWT) - I use the GWT mojo here to compile a client WAR. I used to have everything in here.
/app-core (Shared Code) - JAR
/app-server (Default AppEngine Module) - WAR
/app-auth (Auth AppEngine Module) - WAR
/app-worker (Worker AppEngine Module) - WAR
/app-ear (EAR Package) - I use the AppEngine mojo here for deployment.
pom.xml - parent
I assume the GWT mojo must be ran on the app-ear
module, but how do I provide the app-client
sources to the run configuration?
Upvotes: 0
Views: 180
Reputation: 64541
Mojo's Maven Plugin for GWT does not make it easy to run dev mode in multi-module builds. To get the correct classpath, you need to run the gwt:run
or gwt:run-codeserver
goal in your app-client
module (and to do that you either need to mvn install
your dependencies –app-core
– and/or hack around with profiles and the build-helper-maven-plugin
; see this POM for an example, which both requires mvn install
to resolve the dependency, and uses the build-helper-maven-plugin
so you can make changes to your shared code without the need for a mvn install
and restarting dev mode).
FWIW, net.ltgt.gwt.maven:gwt-maven-plugin
(disclaimer: I'm the author) was created with that use-case in mind from the beginning; so you actually run gwt:devmode
or gwt:codeserver
on the parent module and tell it which module(s) is a GWT app and where to generate the *.nocache.js
.
Upvotes: 1