Friday, 23 April 2010

GWT2 and Maven

GWT 2 and Maven - Close I have been working with the new GWT 2 code. Especially the new IDE Plugin for eclipse.

One things I remember doing with older 1.5 --> 1.7 code was run a separate Jetty container and pass -noserver to the GWT Dev mode, so that I could control

(a) where the compiled JS files were and went to

(b) running a servlet separate from the hosted app was nice.

With the new in-IDE mode and the new browser plugin, I found it is almost there. Essentially, my issue I am resolving at the moment is a maven thing.
  1. I don't want the GWT Hosted mode to put compiled *.js files (etc) in my src/main/webapp. Primarily because this folder is in Source Control.
  2. My Maven compiler plugin writes out the WAR when i do mvn package.
  3. I want (1.) solved by having it splay out the Compiled files to target/some-ignorable-directory and use the magic Jetty ALIAS do-hickey to "combine" src/main/webapp and target/gwt-hosted-war.tmp
achievable, yes/. The problem comes that .. In the lanucher .. I try: -war "${workspace_loc:sample-gwt-webapp/target}/gwt-hosted-war.tmp"
-war "${workspace_loc:sample-gwt-webapp/target}/gwt-hosted-war.tmp"
But, that directory does not actually have the WEB-INF files in it.

How could I solve it:
  1. symlinks src/main/webapp/gwt/* to target/tmpfilder/gwt with Linux and Mac.. not portable to Windows .. except for linkd
  2. before starting the Jetty Container, copy the src/main/webapp to target/tmp-war/ .. not nice for code changes of running jetty in src/main/webapp
  3. Make changes to the dev classes .. (you can provide a new ServletContainer .. but only that .. and it's not in there where the checking is done)
  4. use the -noserver and use Jetty (I want to run just on JVM for debugging) ..

No comments:

Current 5 booksmarks @