增加m2e Eclipse插件中的堆大小 [英] Increase heap size in m2e Eclipse plugin

查看:171
本文介绍了增加m2e Eclipse插件中的堆大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何增加m2e Eclipse插件的堆大小?基本上,我试图在STS(SpringSource的Eclipse版本)下使用Cargo和Selenium进行自动化集成测试,并安装了预安装的m2e(流行的Eclipse的Maven插件)。

How does one increase the heap size of the m2e Eclipse plugin? Basically, I'm trying to run an automated integration test using Cargo and Selenium under STS (SpringSource's version of Eclipse) with pre-installed m2e (the popular Maven plugin for Eclipse).

每当我运行

mvn verify

我得到臭名昭着的 java.lang.OutOfMemoryError:Java堆空间... 63M / 63M 。所以我先做了一些研究。通过MAVEN_OPTS,Eclipse.ini / STS.ini,运行配置,甚至通过pom.xml的Maven插件增加内存。没有改变。相同的错误和相同的内存量63M / 63M。

I get the infamous java.lang.OutOfMemoryError: Java heap space... 63M/63M. So I made some research first. Increase the memory via MAVEN_OPTS, Eclipse.ini / STS.ini, Run Configurations, and even via the Maven plugins thru the pom.xml. Nothing changed. Same error and same amount of memory 63M/63M.

我知道我的项目工作。 POM是正确的。为什么?因为当我使用独立的Maven运行相同的命令。与硒和货物工程的一体化测试。实际上这是最新的输出(3分钟前):

I know my project works. The POM is correct. Why? Because when I run the same command using a stand-alone Maven. The integration test with Selenium and Cargo works. In fact here's the latest output (3 minutes ago):

[INFO] [beddedLocalContainer] Jetty 8.x Embedded is stopped
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4 minutes 24 seconds
[INFO] Finished at: Wed Oct 26 14:08:16 CST 2011
[INFO] Final Memory: 70M/149M
[INFO] ------------------------------------------------------------------------

我不是问如何在独立的Maven命令中增加内存。我具体询问如何增加m2e的堆大小。

I'm not asking how to increase the memory in stand-alone Maven command. I'm specifically asking how to increase the heap size for m2e.

注意:默认情况下,m2e Eclipse插件没有验证目标的快捷方式。您必须通过运行配置(没有Args选项卡,fyi)创建一个新的。

Note: By default the m2e Eclipse plugin does not have shortcut to the "verify" goal. You have to create a new one via Run Configuration (which does not have an Args tab, fyi).

推荐答案

Maven 2插件,在eclipse.ini或MAVEN_OPTS环境变量中设置java选项将对您的构建没有影响。您需要通过Eclipse中的编辑配置和启动对话框添加一些命令行参数。

When working with the Maven 2 plugin, setting java options in eclipse.ini or MAVEN_OPTS environment variable will have no effect on your build. You need to add some command line args via the "Edit Configuration and launch" dialog in Eclipse.

运行方式>Maven Build,单击JRE 选项卡,输入虚拟机参数,例如

"Run As" > "Maven Build", click on the "JRE" tab, enter VM args e.g.

-Xms128M -Xmx512M

这篇关于增加m2e Eclipse插件中的堆大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆