QuickTip : How to increase the Java heap memory for Maven 2 on linux
Posted by vikashazrati on Thursday, July 26, 2007
If you get an error OutOfMemory error while doing mvn site, because of all the reports that you are generating, just increase the heap size for maven2. The way to do that on linux.
In your mvn.sh add this as the first line after the copyright and other comments.
export MAVEN_OPTS=”-Xmx512m”
note than Maven 2.0.6 onwards some users have reported that the double quotes give problems, hence you might want to use
export MAVEN_OPTS=-Xmx512m




Thursday, November 15, 2007 at 4:41 pm
this is wrong.
export MAVEN_OPTS=-Xmx512m
above is the right way of doing. you should not use double Quotes.
Thursday, November 15, 2007 at 11:23 pm
Well on my maven 2.0.5 on the ubuntu system, the one with double quotes just works fine. Do you get any error when you use double quotes?