首页 > 解决方案 > 如何增加maven PermGen空间

问题描述

我在构建时收到此错误:

[ERROR] PermGen space -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/OutOfMemoryError

使用 java 7. 帮助?

标签: mavenjava-7

解决方案


这似乎可以做到( MaxPermSize部分):

export MAVEN_OPTS="-XX:MaxPermSize=128m"

http://cwiki.apache.org/confluence/display/MAVEN/OutOfMemoryError

还有其他方法可以为特定项目设置它。

显然 MaxPermSize 的概念在 java 8 FWIW 中被删除了。


推荐阅读