4

約1週間前に、アプリケーションでgwtモジュールを使用することにしました。私たちはgwt-maven-eclipseトリオを使用しており、すでにフェーズと目標を構成しています。また、開発とテストの時間を短縮するためにコンテキストデプロイを行っています。

しかし;

私たちpackageまたはtomcat:deploy私たちのアプリケーションの場合、gwtモジュールはre-compiling(変更されていないものを含む)です。

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

コンパイル時間を短縮するためにこれらのプロパティをここで設定しましたが、これは私が正確に望んでいることではありません...リソースが変更されたときに起動するようにMavenライフサイクルマッピングも構成しました。しかし、それは日食をブロックし、それはコンパイル時間についても役に立ちませんでした。eclipsegwt:compile process-resources resources:testResources

これは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>

私を助けるためのアイデアはありますか?

4

1 に答える 1

5

gwt-maven-plugin tries (hard) to avoid recompiling modules when the code hasn't changed, but even that takes a bit of time (still less than re-compiling the module; and unfortunately if it detects the module needs to be recompiled, it adds up to the GWT compile time).

If you know you don't need gwt:compile, you can pass -Dgwt.compiler.skip=true to your Maven build to skip the goal and keep "running" your previously compiled code. Similarly, if you know you need gwt:compile, you can pass -Dgwt.compiler.force=true to bypass the "up-to-date check".

于 2011-07-05T09:01:51.713 に答える