1.运行时添加:-Xms1024m -Xmx4096m -Xss20m
2.在pom.xml文件里添加:
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<includes>
<include>**/*Test.java</include>
</includes>
<argLine>-Xms1024m -Xmx4096m -Xss20m</argLine>
</configuration>
</plugin>
<plugin>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
<id>attach-sources</id>