I have a multi-module GWT project with the following approach, but I am having trouble running it in dev mode.
Here is the structure of the POM files.
Parent POM
<project>
<groupId>com.mycmp</groupId>
<artifactId>com.mycmp.xt</artifactId>
<version>1.0.0</version>
<packaging>pom</packaging>
<modules>
<module>../com.mycmp.xt.dm</module>
<module>../com.mycmp.xt.pc</module>
<module>../com.mycmp.xt.re</module>
<module>../com.mycmp.xt.rev</module>
<module>../com.mycmp.xt.webapp</module>
<module>../com.mycmp.xt.services</module>
</modules>
<dependencies>
</dependencies>
<build>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>gwt-maven-plugin</artifactId>
<version>2.5.1</version>
</plugin>
</build>
</project>
From the modules,
- xt.dm is a shared GWT module and so I have it as JAR package.
- xt.pc is one GUI GWT module (only GUI code, all the RPC code lives in the web app module)
- xt.re is another GUI GWT module (same as xt.pc)
- xt.rev is another GUI GWT module (same as xt.rev)
- xt.services is our server side services layer (JAR package)
- xt.webapp is our web app (where web.xml and appcontext.xml and so on are located) (WAR package)
I am thinking about the following questions:
Is this the right approach?
How would I package all this to run from a single Tomcat instance?
How would I run per say xt.pc in dev mode? (I tried marking the
runTarget
under the xt.pc pom.xml, but it didnt work. I think the conflict is in merging the xt.webapp and xt.pc (they both have GWT code).