How can I fix maven hang during gwt-maven-plugin:compile?

Tag: gwt-maven-plugin Author: mxrxhy010 Date: 2013-05-28

mvn clean install results in the following which stalls until I kill the process. This only happens as a part of a much larger build on a bamboo server. When I build locally the build doesn't stall.

[INFO] --- gwt-maven-plugin:2.4.0:compile (default) @ alerts ---
[WARNING] Don't declare gwt-dev as a project dependency. This may introduce complex dependency conflicts
[INFO] Compiling module com....alerts.Alerter
  • What can I do to gain better insight into the hang?
  • What are the likely causes of the hang?

Best Answer

This is likely a problem with memory. If you are bounded by x86 limits (as I am in this case) then you can use gwt.localWorker to reduce memory footprint. Fewer workers translates to less parallel needs and a longer build. Increasing memory may prevent the problem. Increasing the logLevel may expose the nature of the stall.

The following got me past my stall.

<gwt.compiler.localWorkers>1</gwt.compiler.localWorkers>
<gwt.logLevel>TRACE</gwt.logLevel>
<gwt.extraJvmArgs>-Xmx1024m -Djava.io.tmpdir=target</gwt.extraJvmArgs>

Suggestions For Improving Rep Ability - Compare environment settings between build server and local for better ability to rep. JAVA_OPTS and MAVEN_OPTS may import - Ensure you use identical build commands in both contexts - try running with -pl :module-artifact-name on build server to reduce time to failure - mvn -X will provide some additional