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