The setup I use isn't ideal, but it mostly works.
I have the code tree set up the way that the maven GWT plugin wants
it. Java module code is in src/main/java/[module package]. I have
module HTML and CSS in src/main/resources/[module package]/public,
though my index.html (containing a redirect to the actual app HTML) is
in src/main/webapp. There's probably an opportunity to make something
more optimal there. Finally, my web.xml is in src/main/resources/
webapp/WEB-INF.
I use maven to run the app: mvn gwt:run. After building and before
running, though, I found that it wants the web.xml to be in war/WEB-
INF. I manually copy this from src/, and that only needs to be done
when you do a really clean build (including manually removing the war
directory, which you should do if you change versions on any of your
jars to avoid duplicates). It's not perfect, but I haven't spent the
time to figure out how to properly configure the maven GWT plugin.
As for IntelliJ, I would recommend using an IDEA 9 Beta or EAP build
when using GWT > 1.5. Also, IntelliJ will nicely import maven pom.xml
files, so no need to run `mvn idea:idea`. Make sure you accept the GWT
facet, since that's what will give you the nice code navigation when
using GWT-RPC and such. To configure the facet, you'll need to have
GWT downloaded and unpacked somewhere so you can point IntelliJ at it.
It's going to warn you "gwt-user.jar library not found in dependencies
of module" and give you a "Fix" button. However, I've found that when
I do that, I end up with 2 copies of the GWT jars on my classpath (one
from IntelliJ's "fix" and the other from maven) and you'll get strange
errors about classes not being available because your module doesn't
inherit from some module or other that should be included in the base
User module, even when your module does inherit User. Removing the
jars that IntelliJ added when "fixing" the project (or just not
letting it fix it at all) makes these go away.
Finally, for running/debugging from IntelliJ, I just have 3 run
configurations set up: 2 maven configs (gwt:run and gwt:debug) and one
remote debug config. In the debug config, just make sure the port
matches the one that maven echos when waiting for a debugger to attach
when you run gwt:debug.
I hesitated to share all of this because I know it's far from perfect,
but maybe you'll find some of it useful. Let us know if you discover
any other tricks.
-Brian
On Dec 7, 11:01 am, "wil.pannell" <
wil.pann...@pepsiamericas.com>
wrote: