How to increase maven heapspace in hudson builds

If your maven-built project fails in hudson (especially when you’re using the assembly plugin) and it isn’t a compile or test failure, check the console output. If it says “java.lang.OutOfMemoryError: Java heap space”, you need to configure your hudson job to add heap space to the maven process.

  1. Navigate to your hudson job,
  2. click Configure,
  3. scroll down to the Build section, and
  4. click the Advanced button.
  5. Enter this into MAVEN_OPTS: -Xmx512m -XX:MaxPermSize=128m

Here’s a complete stacktrace to help people find this tidbit:

Posted in Technical HOWTOs Tagged with: , , ,
  • Eric

    Thanks.