How to compile only changed parts of gwt modules?

We decided to use gwt modules in our application about a week ago. We are using the gwt-maven-eclipse trio, and we have already set up the phases and goals. We also deploy context to reduce development and testing time.

BUT;

When we package or tomcat:deploy our application, the gwt re-compiling (including immutable ones).

 <set-property name="user.agent" value="gecko1_8"></set-property> <extend-property name="locale" values="en_UK"></extend-property> 

I already set these properties here to speed up compilation time, but that is not what I want for sure ... I also configured the maven lifecycle display in eclipse to run gwt:compile process-resources resources:testResources when any resources change. But it blocks eclipse, and that also did not help compile the time.

This is the gwt-maven-plugin configuration in pom.xml

 <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>gwt-maven-plugin</artifactId> <version>2.3.0</version> <executions> <execution> <goals> <goal>compile</goal> </goals> </execution> </executions> <!-- Plugin configuration. There are many available options, see gwt-maven-plugin documentation at codehaus.org --> <configuration> <runTarget>A.jsp</runTarget> <runTarget>B.jsp</runTarget> <hostedWebapp>${webappDirectory}</hostedWebapp> </configuration> </plugin> 

Any idea to help me?

+4
source share
1 answer

The gwt-maven-plugin tries (hard) to avoid recompiling the modules when the code has not changed, but even it takes a little time (even less than recompiling the module, and unfortunately, if it detects the module needs to be recompiled, this adds time GWT compilation).

If you know you don’t need gwt:compile , you can pass -Dgwt.compiler.skip=true to your Maven assembly to skip the target and save the β€œrun” of the previously compiled code. Similarly, if you know that you need gwt:compile , you can pass -Dgwt.compiler.force=true to bypass the "last check".

+5
source

All Articles