如何只编译gwt模块的更改部分?

Çağ*_*daş 4 eclipse gwt gwt-compiler maven

我们决定在大约1周前在我们的应用程序中使用gwt模块.我们使用gwt-maven-eclipse三重奏,我们已经配置了阶段和目标.我们还在进行上下文部署以减少开发和测试时间.

但;

当我们packagetomcat:deploy我们的应用程序,gwt模块re-compiling(包括未更改的模块).

<set-property name="user.agent" value="gecko1_8"></set-property>
<extend-property name="locale" values="en_UK"></extend-property>
Run Code Online (Sandbox Code Playgroud)

我已经在这里设置了这些属性以加快编译时间,但这不是我想要的......我还配置了maven生命周期映射,eclipse以便gwt:compile process-resources resources:testResources在任何资源发生变化时触发.但它阻止了eclipse,这也无助于编译时间.

这是gwt-maven-plugin配置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>
Run Code Online (Sandbox Code Playgroud)

有什么好主意帮我吗?

Tho*_*yer 5

gwt-maven-plugin尝试(硬)避免在代码未更改时重新编译模块,但即使这需要一些时间(仍然少于重新编译模块;不幸的是,如果它检测到模块需要重新编译,它加起来GWT编译时间).

如果您知道自己不需要gwt:compile,可以传递-Dgwt.compiler.skip=true给Maven构建以跳过目标并继续"运行"以前编译的代码.同样,如果您知道自己需要 gwt:compile,可以通过-Dgwt.compiler.force=true绕过"最新检查".