Tuesday, January 5, 2010

Increasing java heap size when using maven

If you get out of memory exceptions while using maven you can tweak the amount of heap space available to the JVM with the following environment variable,

export MAVEN_OPTS=-Xmx512m

I didn't test any other but i presume you can set other Java options also with the same variable.