Unit & Integration Testing REST Services

Netbeans Maven and PermGen

When I tried the ‘Hello World’ within a more serious example, and running directly from the Netbeans IDE, I found I was still running into PermGen errors. The Maven pom runs org.codehaus.plexus.classworlds.launcher.Launcher with around 86Mb PermGen space allocated.

This is easily fixed. Go to Netbeans, Preferences..., Java, Maven.


Select Edit Global Custon Goal Definitions... and add the verify action, using the verify goal, and set the property Env.MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=512m".


512m for the MaxPermSize turns out to be excessive; 256m would more than suffice.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.