I've struggled for about a week with GWT and Maven
, and I figured it would be a good time to step back and look for some general advice, especially from folks who have been successful with GWT so far.
Up to this point, I've been using Struts
2, Spring, and JPA (backed by hibernate) for my Java-based web development. I have also found that Maven 2 is a genuinely excellent tool to manage the build. It took a while to learn and set up, but by this point, I don't really want to go back to Ant. I'm pretty sold on Maven 2.
I started learning GWT about a week ago, and it looked great at first. I had no trouble doing the StockWatcher app, and I can easily see how to tie GWT in with the sort of work I've already been doing. My overall approach would be to create model objects for the GWT client side that don't rely on annotations or generics (or other things that can't work on the client), and shadow them with annotated classes that can persist through JPA, use Spring to manage transactions and do DI, and so forth.
Because I use Maven 2 to manage so much of my existing build, I was hoping that I could easily "mavenize" the stockwatcher application... and unfortunately, so far, I've had a very difficult time doing that. I checked out the Codehaus mvn plugin, which seems to be the most currently maintained one (the GWT-Maven plugin, according to the authors on the site, is planning to merge with codehaus).
Well, so far this seems like moving target, and the eclipse based approach on the GWT site is extremely well documented and easy to use... so easy that I'm starting to think that maybe I should just revert to using ant through eclipse for a while until the maven plugins are more stable and better documented. I'm very bummed to do this, though, because I find Maven 2 to be an excellent build tool, and I also don't like relying so heavily on Eclipse (I use it when I build with Maven 2, but I like the fact that I can go to the command line whenever I want... fortunately, the ant build used by GWT does run well on the command line, with isn't always the case with Eclipse plug-ins).
So at this point, I just want to solicit some advice from anyone who has experience with these issues...
Has anyone out there successfully used the Maven 2 archetypes to create a GWT app, especially one that uses JPA and/or Spring on the server?
Has anyone successfully done this with the Eclipse/Ant method used for the tutorials on the main google gwt site?
If you're experienced with this, what approach would you recommend for now? Keep butting my head against mvn, or stick with what the google guys are doing for the moment?
All pretty general, but I'd really appreciate any feedback, because I'm kind of spinning my wheels here...