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
Thanks for the aditional tip on incresing the size of the forked JVM.