Maven throws "java.lang.OutOfMemoryError"

java, maven-2, out-of-memory

Solution

Set the environment variable:

MAVEN_OPTS="-Xmx512m"

Problem

I'm compiling an open source project with "mvn install" but ended up with `java.lang.OutOfMemoryError: Java heap space`. I tried to execute `java -Xmx256m` but the output was java synopsis which indicated it's an invalid command. I'm using `jdk1.5.0_08`, any ideas why this is happening? Thanks,

Original source

Related problems