开发者

Reduce number of GWT permutations in maven build

I've been refactoring a GWT project to build outside of eclipse using maven and the GWT plugin. When I build the app in eclipse, it finds my one module and compiles 5 permutations out of it. When I build the same thing with the gwt plugin it needs to compile 75 which takes an age to finish. Increasing the localworkers didn't help with the speed much either

I'm not restricting the user-agents or locales in either build, so why would the eclipse build calculate so many fewer permutations and how can I get the maven build to do the same?

开发者_StackOverflow

The maven compilation is using the following options

com.google.gwt.dev.Compiler -gen /project/target/.generated -logLevel INFO -style OBF -war /project/target/war -localWorkers 1 mymodule


For me the default is to build for 6 browsers. When I specify Safari, then it only builds one permutation. Also, if you have any kind of localization/i18n for languages, you'll be multiplying these permutations by those. This happened to me when I tried to set my default language to 'en', so I just did not bother with that and left it as 'default'.

MyApplication.gwt.xml

<!-- only build for Chrome -->
<set-property name="user.agent" value="safari" />


Have a look at the gwt-maven-plugin docs: here (optimizationLevel) and here (draftCompile)

or read on here about only generating for a specific engine.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜