• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Maven build fails with Out of Memory issue though have increased the heap size

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In my maven build, tried increasing the heap size but the build still fails with out of memory issues

Added the following to pom.xml

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<argLine>-Xmx8192m -XX:MaxPermSize=7168m</argLine>
<!-- integration tests take a very long time so only run them in the CI server -->
<parallel />
<threadCount>1</threadCount>
</configuration>
</plugin>
</plugins>
</build>

<profiles>
<profile>
<id>ci</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<argLine>-Xmx8192m -XX:MaxPermSize=7168m</argLine>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>


Also added JAVA_OPTS

export JAVA_OPTS="-Xmx8192m -XX:MaxPermSize=7168m"

And also set the following in mvn/jvm.config

-Xmx8192m -XX:MaxPermSize=7168m

But the build still fails with the following error

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.14:test (default-test) on project package-tests: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.14:test failed: The forked VM terminated without saying properly goodbye. VM crash or System.exit called ?
[ERROR] Command was/bin/sh -c cd /package/package-tests && /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.91-0.b14.el7_2.ppc64le/jre/bin/java -Xmx8192m -XX:MaxPermSize=7168m -jar /package/package-tests/target/surefire/surefirebooter7005160161460016356.jar /package/package-tests/target/surefire/surefire8004755689115768809tmp /package/package-tests/target/surefire/surefire_04955814058535390627tmp
reply
    Bookmark Topic Watch Topic
  • New Topic