I have been building GWT war file on Jenkins. In a specific "job" I have encountered an error which says [ERROR] Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
. As a solution, I have included an environment variable "MAVEN_OPTS" with a value of -Xms512m -Xmx1024m -XX:MaxPermSize=512m
. FYI, I have also tried 'echo' command prompt for MAVEN_OPTS and it displays the same value as I had given in the environment variable.
MAVEN COMPILER PLUGIN in pom.xml :
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
<showDeprecation>true</showDeprecation>
<showWarnings>true</showWarnings>
<executable>${env.JAVA_HOME}/bin/javac</executable>
<fork>true</fork>
<verbose>true</verbose>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
**Full error: **
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 13:51.518s
[INFO] Finished at: Thu Jan 29 13:06:25 IST 2015
[INFO] Final Memory: 17M/989M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:gwt-maven- plugin:2.4.0:compile
(default) on project dpgwtwebapplication: Command [[
[ERROR] C:\Program Files\Java\jdk1.7.0_04\jre\bin\java -Xmx512m -classpath "C:\U
Also in mvn.bat file, the value of MAVEN_OPTS is displaying as -Xmx512m
as you can notice in last of Full error.
I guess the problem is not to less memory for the java compile process but for the gwt-compiler. Increase the memory significantly here: org.codehaus.mojo gwt-maven-plugin ...
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments