eclipse运行maven的内存溢出

最近项目用maven执行install就会报错,找了很多解决的办法,都是临时一会,过段时间又会出现问题。
错误代码如下:


[ERROR] Java heap 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


最终解决办法:
项目右键---> run as ---> run configuragtions---> jre标签 ---> VM arguments:
-server -Xms512m -Xmx1024m -XX:PermSize=512m -XX:MaxPermSize=512m -XX:+CMSClassUnloadingEnabled -XX:+PrintGCDetails -Xloggc:%M2_HOME%/gc.log -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=%M2_HOME%/java_pid.hprof

你可能感兴趣的:(eclipse运行maven的内存溢出)