Out of memory error during compilation when using the install phase but not 
when using the compile phase
--------------------------------------------------------------------------------------------------------

                 Key: MNG-4558
                 URL: http://jira.codehaus.org/browse/MNG-4558
             Project: Maven 2 & 3
          Issue Type: Bug
          Components: Errors, Plugin API
    Affects Versions: 2.2.1
         Environment: Mac OS X 10.6.2 (32 bit); MacBook Pro (Intel Core 2 duo); 
Java 1.6.0_17
            Reporter: Chris Williams
            Priority: Minor


We've had to set the environment variable MAVEN_OPTS to "-Xmx1024m" in order to 
avoid running out of memory during compilation of our project. Once we did 
that, there were no problems with 2.0.10. After upgrading to 2.2.1 (also 
confirmed to be a problem on 2.2.0), the out of memory error comes back.

We tried to narrow down the problem and zeroed in on our Maven install. Our 
assumption is that the MAVEN_OPTS aren't being passed to the javac command with 
2.2.0 and 2.2.1 but are with 2.0.10.

Reverting to 2.0.10 solves this problem.

We tried to add a compiler plugin configuration to turn on verbose logging 
hoping that we could then see the javac command before it was run but had no 
luck. I can re-run our tests on this side if someone can provide the correct 
way to force maven to spit out the command its running before it runs so we can 
verify our assumption that the MAVEN_OPTS aren't being used in 2.2.* but were 
in 2.0.10.

Here's a copy of the stack trace for the install command:

[INFO] [enforcer:enforce {execution: enforce-java}]
[INFO] [resources:resources {execution: default-resources}]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:compile {execution: default-compile}]
[INFO] Compiling 624 source files to /Users/<omitted>
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Compilation failure
Failure executing javac, but could not parse the error:


The system is out of resources.
Consult the following stack trace for details.
java.lang.OutOfMemoryError: Java heap space
        at com.sun.tools.javac.code.Type$ClassType.constType(Type.java:559)
        at com.sun.tools.javac.comp.Attr.visitLiteral(Attr.java:2387)
        at com.sun.tools.javac.tree.JCTree$JCLiteral.accept(JCTree.java:1570)
        at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:360)
        at com.sun.tools.javac.comp.Attr.attribExpr(Attr.java:377)
        at 
com.sun.tools.javac.comp.Annotate.enterAttributeValue(Annotate.java:179)


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to