“Invalid maximum heap size” when running Maven
运行mvn package,报错:
Invalid maximum heap size: -Xmx512m.
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
解决方法一:
alter jvm.config in .mvn directory ( it is in controller directory ). study mvn.sh that comes with maven. you will see MAVEN_OPTS setting in the script. try out java -version before altering. eg : java -Xmx512m -version now you know how to go about and make the changes.
解决方法二:
you can try to set the initial heap size and initial permgen size relatively small, but set the proper max heap and pergent via -Xms128m -Xmx1024m -XX:PermSize=128m -XX:MaxPermSize=256m
Also don't set permgen to 512 - it's too much for typical scenarious.
Also you may want to use fork option with maven and start plugin execution in different JVMs at all.
For example
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.5.1</version>
<configuration>
<fork>true</fork>
</configuration>
</plugin>
Also, while allocating memory also make sure that you have that much free memory available.
方法三:
set MAVEN_OPTS=-Xmx512m -Xms128m -Xss2m
“Invalid maximum heap size” when running Maven的更多相关文章
- soapUI启动报错:The JVM could not be started. The maximum heap size (-Xmx) might be too large or an antivirus or firewall tool could block the execution.
版本: soapUI-5.2.1 问题: 启动soapUI时报错:The JVM could not be started. The maximum heap size (-Xmx) might be ...
- Invalid initial heap size: -Xms
-Xxs512m注意 Xxs 和 512m中间无空格就行了.
- How To Fix soapUI JVM Maximum Heap Size (-Xmx) Error [Solution]
http://quicksoftwaretesting.com/soapui-jvm-heap-size-xmx-error/ -Xms128m -Xmx1000m -Dsoapui.properti ...
- Setting Tomcat Heap Size (JVM Heap) in Eclipse
this article picked from:http://viralpatel.net/blogs/setting-tomcat-heap-size-jvm-heap-eclipse/ Rece ...
- 报错解决——uwsgi错误invalid request block size
uwsgi错误invalid request block size 使用uwsgi启动django代码,然后打开浏览器输入http://localhost:8000/admin.后台出现下面错误 in ...
- uwsgi错误invalid request block size
uwsgi错误invalid request block size 今天使用uwsgi启动django代码,然后打开浏览器输入http://localhost:8000/admin.后台出现下面错误 ...
- for循环中删除map中的元素,valgrind检测提示error:Invalid read of size 8
#include <iostream> #include <map> using namespace std; class A { public: typedef std::m ...
- heap size eclipse 堆内存
可以根据eclipse 或 myeclipse heapstats 使用情况调整堆内存大小,heap size 设置,-vmargs-Xms256-Xmx1024 ,其中Xms表示初始值,Xmx表示最 ...
- listview 遇到问题java.lang.IndexOutOfBoundsException: Invalid index 0, size is 0
开发的时候 遇到 java.lang.IndexOutOfBoundsException: Invalid index 0, size is 0 这个异常有时候会有,有时候正常 不太好捕捉 猜测 已经 ...
随机推荐
- 攻城狮在路上(贰) Spring(一)--- 软件环境、参考书目等一览表
一.软件环境: 二.参考书目: <Spring 3.X 企业应用开发实战> 陈雄华.林开雄著 电子工业出版社出版 三.其他说明: spring 源码地址:https://github.co ...
- Solr入门之(4)配置文件solr.xml
<?xml version="1.0" encoding="UTF-8" ?> <!-- This is an example of a si ...
- C# SMTP邮件发送 分类: C# 2014-07-13 19:10 334人阅读 评论(1) 收藏
邮件发送在网站应用程序中经常会用到,包括您现在看到的博客,在添加评论后,系统会自动发送邮件通知到我邮箱的,把系统发送邮件的功能整理了下,做了一个客户端Demo,希望对有需要的童鞋有所帮助: 核心代码: ...
- python生成RSS(PyRSS2Gen)
既然能够用python解析rss,那么也顺带研究下生成rss. 其实很简单,只是生成一个比较特殊点的xml文档而已. 这里我使用了PyRss2Gen,用法很简单,看代码就知道了,如下: import ...
- 启动Tomcat服务器报错: Several ports (8005, 8080, 8009) required
错误记录--更改tomcat端口号方法,Several ports (8005, 8080, 8009) http://blog.csdn.net/xinxin19881112/article/det ...
- filter应用案例二:权限控制
filter可以用来进行权限控制,比如admin文件夹下的文件只允许管理员进入,那么,可以给admin文件夹加上一个过滤器: 简单代码示例: import java.io.IOException; i ...
- hdu 1370 Biorthythms 中国剩余定理
Biorhythms Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total ...
- express-4 质量保证(1)
QA 在Web开发中,质量可以分解为四个维度: 到达率: 到达率是指产品的市场普及程度,即查看网站或使用服务的人数.到达率和盈利能力是正相关关系:访问网站的人越多,购买产品或服务的人就越多.从开发的角 ...
- Chage
For many times,i've given my own a new lifestyle,such as don't stay up late,have breakfast......whil ...
- 使用Soapui测试webservice接口
本来想自己写一个的,但下面这个资料比较详细(截图和步骤细节),就省事了,具体内容见: http://blog.csdn.net/oracle_microsoft/article/details/568 ...