views:

379

answers:

2

Hi, I attempted to change my heap size for maven easyb plugin http://www.easyb.org/maven-easyb-plugin/. In my easyb test I added standard code to print the heap size using the code Runtime.getFreeMemory() and Runtime.getTotalMemory().

I tried setting the MAVEN_OPTS=-Xmx1024m -Xms1024m and also set the maven opts in Maven surefire plugin. Now when I run the same class from the Junit I can see the getTotalMemory() displaying a number close 1Gig but the when the same classes are invoked from easyb plugin they do not reflect the memory size.

Shouldn't there be a way of passing JVM opts to maven easyb plugin when it runs these easyb tests? At the very minimum it should atleast pick up the MAVEN_OPTS settings from the environment.

Has someone bumped into problems like this? (A search on this group's archive does not reveal much)

A: 

Try to define

JAVA_OPTS=-Xmx1024m -Xms1024m

Probably, MAVEN_OPTS is even not necessary. My guess is that MAVEN forks a new JVM inside to run easyb. And, probably, it's wise of MAVEN to separate it's own JVM settings from settings for JVM it runs.

A: 

This is Issue 77: Enhancement: specify max memory for maven plugin which is still "New" but has a patch (with tests) attached. So grab the sources, patch them and rebuild the plugin.

Pascal Thivent