Use MAVEN_OPTS -Xmx1024m

for example, put it in your .bashrc or .profile
export MAVEN_OPTS="-Xmx1024m"

I am using Hudson and you can specify it in the configuration of your project build, under 'Build/Advanced/MAVEN_OPTS

(or also as I had to, on the commandline of the startup of Hudson,
java -Xmx1024m -jar hudson.war
as the checkout of the code was causing the OOM exception, not the build)


youhaodeyi wrote:
I got a maven project and compile it by maven. Then I got the error
"java.lang.OutOfMemoryError: Java heap space". How can I set the memory size
running mvn command?

thanks.


--
Fiona Mahon
Pervasive Communication Services(PCS),
Applied Research

Telecommunications Software & Systems Group (TSSG),
ArcLabs Research and Innovation Building,
Waterford Institute of Technology,
Carriganore Campus, Carriganore,
Co. Waterford, Ireland
        
www: www.tssg.org/people/fmahon
tel: +353 (0)51 302 928 fax: +353 (0)51 341 100 e-mail: [email protected]
Skype: fiona_mahon



Reply via email to