Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Maven surefire permgen out of space

Tried many ways to increase permgen size but no luck.

I am using following configuration in my pom

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-surefire-plugin</artifactId>
    <version>2.18.1</version>
    <configuration>
        <includes>
            <argLine>-Xmx512m -XX:MaxPermSize=512m -XX:PermSize=216m</argLine>
        </includes>
    </configuration>
</plugin>

Tried "set MAVEN_OPTS=-Xmx512m -XX:MaxPermSize=128m" in command line, no luck as well.

maven Surefire booter forkedBooter

like image 332
王子1986 Avatar asked Nov 26 '25 21:11

王子1986


1 Answers

Your configuration is slightly incorrect. You don't need the <includes> element, <argLine> should be directly under <configuration>.

<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-surefire-plugin</artifactId>
  <version>2.18.1</version>
  <configuration>
    <argLine>-Xmx512m -XX:MaxPermSize=512m -XX:PermSize=216m</argLine>
  </configuration>
</plugin>
like image 128
Tunaki Avatar answered Nov 29 '25 10:11

Tunaki



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!