0

I am getting StackOverflowError while building my project like - The system is out of resources. Consult the following stack trace for details.

java.lang.StackOverflowError
    at com.sun.tools.javac.comp.Attr.attribExpr(Attr.java:625)

When i increased maven memory from terminal like export MAVEN_OPTS="-Xms1024m -Xmx1024m -XX:PermSize=1024m -XX:MaxPermSize=1024m -Xss1024m" It's working but i need to do same from pom file as build is failing in jenkins too. I am using spring boot maven plugin, i tried many things like below but its not working. Please help. Tried solutions in maven plugin -

 <jvmArguments>
                    -XX:PermSize=1024m
                    -XX:MaxPermSize=1024m
                    -Xss1024m
                </jvmArguments>

  <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-compiler-plugin</artifactId>
    <configuration>
        <executable>true</executable>
        <fork>true</fork>
        <meminitial>128m</meminitial>
        <maxmem>512m</maxmem>
        <compilerArgument>-verbose -bootclasspath ${java.home}\lib\rt.jar</compilerArgument>
    </configuration>
</plugin>

1 Answers1

0

Jankins builds a docker container based on your own docker file.

Inside that file you have to set maven options for its own JVM memory extention!

Antonio Petricca
  • 8,891
  • 5
  • 36
  • 74