Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

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

like image 914
sgargan Avatar asked Jan 19 '11 20:01

sgargan


2 Answers

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.

like image 107
Joscha Avatar answered Dec 07 '22 21:12

Joscha


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" />
like image 36
Joseph Lust Avatar answered Dec 07 '22 21:12

Joseph Lust