Increasing memory given to maven using MAVEN_OPTS did not solve the problem. As this setting just increases the memory given to the build process and not the individual test cases. The solution was to use the following configuration in the surefire plugin.
<argLine>-Xms256m -Xmx512m</argLine> <testFailureIgnore>false</testFailureIgnore>
The pom for the integration test can be found here. This fixed the heap space issue and now we have our test cases running on the nightly build. You can see the status of our nightly builds at http://builder.wso2.org/browse/MASHUP-NIGHTLY