• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • paul wheaton
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Tim Holloway
  • Carey Brown
  • salvin francis

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

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • 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
 
Why is the word "abbreviation" so long? And this ad is so short?
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!