Reputation: 9139
Recently I've split my GWT 2.4 application into two maven modules: domain and webapp. Domain module (according to its name) contains domain classes and webapp contains all other GWT-related stuff. Webapp depends on domain.
Everything is almost the same as described here: http://mojo.codehaus.org/gwt-maven-plugin/user-guide/multiproject.html
When I run (from reactor):
mvn clean package
maven builds application WAR appropriately: first it compiles domain, then webapp, next creates war file which can be deployed on tomcat and works fine. However, if I try to run application in the hosted mode:
mvn gwt:run
maven tries to resolve dependency to domain module in my local repository and remote repositories. Since I've deleted it from my local repo, maven can not find it and build (hosted mode) fails. Of course I can install domain module into my local repo first, but it's smells like a dirty workaround for me. Domain has been removed from local maven repository intentionally in order to make sure that hosted mode runs with the old (outdated) version taken from local repo, instead of working with the previously built domain artifact.
If domain module was installed in my local repository, after mvn clean package
completed, webapp target directory contains exploded WAR with the recent version of domain JAR. When I run gwt:run
, new version of domain artifact (in target) is replaced with the outdated one taken from local repo (I can see changes)!
How is this possible? Is it a bug in gwt maven plugin? Is there any way to avoid such strange plugin behavior?
Upvotes: 2
Views: 886
Reputation: 1404
might this be a solution for you? http://mojo.codehaus.org/gwt-maven-plugin/user-guide/productivity.html For me it works. I have different modules as well. With the help of the link I can make changes in the domain module and simply restart the hosted mode. Doesn't work for all changes though.
Upvotes: 1