Avoiding OutOfMemory errors in Maven (part 2)

As Rick Hightower stated in a previous comment, another way to avoid running out of memory is forking the virtual machine. When doing so the MAVEN_OPTS doesn’t affect the new vm, you have to use the maven.junit.jvmargs property.

maven.junit.fork=true
maven.junit.jvmargs=-Xmx256m

One thought on “Avoiding OutOfMemory errors in Maven (part 2)

Leave a comment