Yes sure, why not? Consider the following structure:
root-pom--->common
|
+-->frontend
|
+-->backend
Have frontend
and backend
depend on common
and put your domain objects in common
.
You should remember to have *.gwt.xml
file exposing your VO's in the common
project and include that in your frontend
's gwt.xml
descriptor, eg.
<module>
<source path="your.vo.package" />
</module>
And - as Thomas Broyer points out - remember to make the source code available to frontend
, this does not necessarily have to be in a separate jar, though. You can package the source with the .class files. The gwt-maven-plugin
's gwt:resources
goal is useful for this purpose:
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>gwt-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>resources</goal>
</goals>
</execution>
</executions>
</plugin>
...
</plugins>
</build>
Cheers,