On 3 August 2010 10:44, abby <misra.a...@gmail.com> wrote:
> Has anyone gotten these to work? I am surprised at the lack of support
> gwt has for maven. Looking at the mojo users group, it seems that gwt-
> maven developers are equally frustrated

[I don't know why anyone in 2010 still would want to reinvent the
wheel and expect everybody else to learn how to use their unusual
build system when Maven offers a reasonably well working alternative
that most people are already familiar with. Sadly, most people simply
do not appreciate the importance of the build step ("Do we really need
a separate build? Why can't we just build in Eclipse?"). :-) ]

> Can someone clarify if gwt-maven 1.3.1 fix by google magically makes
> maven play nicely? If so any documentation/howto's would be godsend.

I use Jetty instead of Tomcat but other than that: yes, it's possible.
It's not easy, though. Luckily, most of the hard work has been done
already by the good folk at Spring Framework's Roo. So what I did was:
install Roo, create a very basic GWT project (Hibernate, Hypersonic in
memory, one entity + GWT setup) and then remove any reference to Roo
and most of the Roo generated Java (use common sense and your own
judgement). That will leave you with an almost functional Maven
project (you should be able to take over from there).

This is not a perfect result but it will get you close enough for you
to fix the things that don't work. There are, however, still a few
caveats.

1. You'll have to go out and find all the various repositories that
offer you the (GWT related) Maven artifacts that you need and put
those repositories in your settings.xml. This is especially true if
you want to use any of the GWT-* projects.
2. Given the poor Maven support, the POMs Maven downloads will usually
not have any references to transitive dependencies. You'll have to add
required transitive dependencies to your project's pom.xml explicitly.
3. Roo uses AspectJ. I left in AspectJ support because I thought it
might be useful later on but if you want to remove it, you'll have a
bit more work to do.
4. Roo uses GWT 2.1.0-M2. I don't know if downgrading breaks anything.

The end result follows Maven directory rules (no silly 'war' directory
in the project root directory), it builds a proper WAR (although I
haven't tried running it), and if you leave "mvn gwt:run" running any
changes you make in Java or other files will be picked up
automagically.

P.S. Please note that the project built by Roo isn't bug free.
Strangely, if you create the same project but use Spring MVC (e.g.)
instead of GWT then it all works perfectly. This doesn't affect the
Maven setup, though.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to