Connexxion : Connecting Life with Technology

Byte by Byte Impressions on Technology, People and Process !

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

2 Responses to “QuickTip : How to increase the Java heap memory for Maven 2 on linux”

  1. beyondwork Says:

    this is wrong.

    export MAVEN_OPTS=-Xmx512m

    above is the right way of doing. you should not use double Quotes.

  2. vikashazrati Says:

    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?

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>