If you get the following error, it is most likely that the “Surefire” pluggin does not have enough memory.
Error occurred during initialization of VM
Could not create the Java virtual machine.
Could not reserve enough space for object heap
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] There are test failures.
The solution is to increase the memory for the Surefire pluggin using the command line option:
mvn -Dsurefire.memory="-Xmx512m" clean install