out of memory error on build despite adjusting heap-size
--------------------------------------------------------

                 Key: SLING-2284
                 URL: https://issues.apache.org/jira/browse/SLING-2284
             Project: Sling
          Issue Type: Bug
         Environment: Mac OSX unix
Maven 3.0.3
java 1.6
            Reporter: Thomas Fitzpatrick


 get the following error running the maven build for Apache Sling, even with 
the recommended heap size:

main:
     [echo] **************** WARNING (SLING-443/SLING-1782) 
******************************
     [echo] On most platforms, you'll get OutOfMemoryErrors when building 
unless you set
     [echo] on 32bit platforms: MAVEN_OPTS="-Xmx256M -XX:MaxPermSize=256M", see 
SLING-443
     [echo] on 64bit platforms: MAVEN_OPTS="-Xmx512M -XX:MaxPermSize=512M", see 
SLING-1782
     [echo] 
******************************************************************************
[INFO] Executed tasks
[INFO] 
[INFO] --- maven-resources-plugin:2.4.3:testResources (default-testResources) @ 
sling-launchpad-webapp-archetype ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory 
/Users/thomasf/slingDownload/sling/maven/archetypes/launchpad-webapp/src/test/resources
[INFO] Copying 3 resources
[INFO] 
[INFO] --- animal-sniffer-maven-plugin:1.7:check (default) @ 
sling-launchpad-webapp-archetype ---
[INFO] Checking unresolved references to org.codehaus.mojo.signature:java15:1.0
[ERROR] Java heap space -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e 
switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please 
read the following articles:
[ERROR] [Help 1] 
http://cwiki.apache.org/confluence/display/MAVEN/OutOfMemoryError
Sure enough my heap size is the same that they recommend on the project 
homepage:

echo $MAVEN_OPTS
-Xmx512M -XX:MaxPermSize=512m
I suspect that the cause is that maven is forking and the jvm in the child 
process does not have the same heap size - however I cannot identify which 
plugin is forking from the console output.


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to