I am working on a rather complex java project with many dependencies and many unit tests.
I am using java 1.6.0_65 on mac (mavericks) with maven 3.0.5 with maven-sur
If anyone is including a custom argLine argument, you must reconsider because it is likely the source of your issues with the memory allocation.
For Example (I used to have):
XX:MaxPermSize=4096m ${argLine}
Now I use hard specified values:
-Xmx1024m -XX:MaxPermSize=256m
For whatever reason, Applications that integrate with Surefire such as Jacoco, dont request enough memory to coexist with the testing that happens at build time.
(more information can also be found at this s.o. question (1))
(1)-maven jacoco: not generating code coverage report