Java – Maven surefire permgen out of space

Many methods were tried to increase the size of permgen, but there was no luck

I use the 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>

There was no luck trying to "set maven_opts = - xmx512m - XX: maxpermsize = 128M" on the command line

Solution

Your configuration is slightly incorrect You do not 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>
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>