Because life is too short to manually write xml content for servlets in web.xml files (and not everybody uses servlet 3.0), you can now automatically merge your web.xml with generated servlet lines for classes annotated with @RemoteServiceRelativePath. This feature has been added in mergewebxml mojo
<project> [...] <build> <plugins> [...] <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>gwt-maven-plugin</artifactId> <version>2.8.1</version> <configuration> <packageNamePerModule> <hello>org.codehaus.mojo.gwt.test.server</hello> </packageNamePerModule> <scanRemoteServiceRelativePathAnnotation>true</scanRemoteServiceRelativePathAnnotation> </configuration> <executions> <execution> <id>mergewebxml</id> <phase>process-classes</phase> <goals> <goal>mergewebxml</goal> </goals> </execution> </executions> </plugin> [...] </plugins> </build> [...] </project>
As the the annotation processing need the compiled classes you need to bind the mojo to at least compile phase. The other mojo parameters are :