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
beyondwork
Thursday, November 15, 2007
this is wrong.
export MAVEN_OPTS=-Xmx512m
above is the right way of doing. you should not use double Quotes.
Fawad
Thursday, April 26, 2012
for ms windows: set MAVEN_OPTS=”-XX:MaxPermSize=256m” or -Xmx512m
vikashazrati
Thursday, November 15, 2007
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?
Chandan Benjaram
Thursday, October 9, 2008
Thanks. Both of these options working on my Mac X 10.5.
-Chandan Benjaram
Upekha
Wednesday, October 29, 2008
it works
Akila
Monday, November 24, 2008
I’m using maven 2.0.6 on the ubuntu system. It worked for me without quotes. Thanks.
Akila
Tuesday, November 25, 2008
Additionally I use Artifactory 1.3.0-beta-5 as well. Later when I was using it I got java.lang.OutOfMemoryError: PermGen space exception . So I added the following command in my mvn.sh (This time with quotes)
export MAVEN_OPTS=”-Xmx1024M -XX:MaxPermSize=1024m”
It worked well.
Lee Yates
Wednesday, January 28, 2009
I have tried all of these options on linux and MacOS. While they do not cause errors they do not increase the memory allocated to the process or solve the problem.
Adding the following to my bash profile does solve the problem
export MAVEN_OPTS=”-Xmx2048m -XX:MaxPermSize=128m”
vikashazrati
Wednesday, January 28, 2009
Thanks for sharing that Lee.
Dominik
Monday, October 19, 2009
Hello Vikas,
couldn’t you integrate all this and update your post? I mean
– the non-quoted version
– include the export MAVEN_OPTS=”-Xmx2048m -XX:MaxPermSize=128m” version (which on my Mac OS X doesn’t work, single quotes are required instead)
Dominik
Hen
Thursday, December 17, 2009
I suspect the double quote issue is because they’re not double quotes *cryptic pause*.
Your blog engine is turning them into different characters – angled double quotes rather than double quotes. The shell is happy with a single quote or a double quote, but not with a non-ascii quote character.
Judy Chu
Friday, January 1, 2010
Tech Question:
Q
Pavan Kumar Sura
Thursday, January 14, 2010
Also make sure to source the profile after making any changes to it. Example, at the command prompt type: source .profile
Replace the profile name based on your bash file name.
Ankur Maheshwari
Friday, March 12, 2010
If some one is facing the problem, when he is using the windows,
set the following command in the mvn batch file located bin folder after the comments end.
Command:- set MAVEN_OPTS=-Xmx512m
madhuka
Wednesday, September 7, 2011
Thank you
lkafle
Tuesday, October 25, 2011
great article for maven