Thanks Mark.
 
You are right that geronimo doesn't reset MAVEN_OPTS. The root cause is that I have %HOME%\mavenrc_pre.bat on my machine, which reset MAVEN_OPTS.

 
On Mon, Jul 5, 2010 at 11:50 PM, Mark Struberg <struberg@yahoo.de> wrote:
han, it's not reset in the build.

However, a few tasks are forked by maven, so they do not inherit your environment settings.

For those cases you might try to export MAVEN_OPTS=...

LieGrue,
strub

--- On Mon, 7/5/10, han hongfang <hanhongfang@gmail.com> wrote:

From: han hongfang <hanhongfang@gmail.com>
Subject: Re: Out of memory error when building geronimo
To: dev@geronimo.apache.org
Date: Monday, July 5, 2010, 3:13 PM

Thanks Rex. But the same error occur.
 
Upgrading -Xmx and -XX:MaxPermSize may solve the out of memory problem, but the point is the environment variable MAVEN_OPTS got changed (from "-Xmx1024m -XX:MaxPermSize=256m" to "-Xmx512m") during geronimo build, and my setting doesn't take effect to solve the out of memory.

 
Is MAVEN_OPTS reset somewhere when building geronimo?


On Mon, Jul 5, 2010 at 5:38 PM, Mark Struberg <struberg@yahoo.de> wrote:

same here, upgrading to PermGenSpace of 512m did help.

But currently the build still fails while building the tomcat7 integration:


[org.apache.geronimo.system.configuration.DependencyManager] : Could not start bundle: org.apache.geronimo.configs.tomcat7 [68]
org.osgi.framework.BundleException: Unresolved constraint in bundle org.apache.geronimo.configs.tomcat7 [68]: Unable to resolve 68.0: missing requirement [68.0] package; (package=org.apache.geronimo.tomcat) - [68.0] package; (package=org.apache.geronimo.tomcat)

       at org.apache.felix.framework.Felix.resolveBundle(Felix.java:3421)
       at org.apache.felix.framework.Felix.startBundle(Felix.java:1754)

LieGrue,
strub


--- On Mon, 7/5/10, Rex Wang <rwonly@gmail.com> wrote:


From: Rex Wang <rwonly@gmail.com>
Subject: Re: Out of memory error when building geronimo
To: dev@geronimo.apache.org
Date: Monday, July 5, 2010, 9:08 AM





try another OPTs?..

JAVA_OPTS     -Xms256m -Xmx1024m -XX:MaxPermSize=256m

2010/7/5 han hongfang <hanhongfang@gmail.com>


Hi,

 
I'm trying to build geronimo server trunk with sun jdk 1.6.0_20 on my winXP. I have this environment variable set.
 
         MAVEN_OPTS = -Xmx1024m -XX:MaxPermSize=256m
 
Before issue the build command, I echo this variable in command prompt window, and I can see the value is exactly what I have set (-Xmx1024m -XX:MaxPermSize=256m).

 
Then I issue the build command (i.e., mvn clean install) in the root dir of trunk, the build gets failed in serveral minutes with error msg indicates out of memory.
 

[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
 at java.util.ArrayList.newElementArray(Unknown Source)
 at java.util.ArrayList.growAtEnd(Unknown Source)

 at java.util.ArrayList.add(Unknown Source)
 .....
 
When I echo the environment variable again, but its value changes to "-Xmx512m".
 
Does somebody know what happened to MAVEN_OPTS? Why its value changes after build command?

 
TIA.

--
Best regards,
 
Han Hong Fang
 



--
Lei Wang (Rex)
rwonly AT apache.org









--
Best regards,

Han Hong Fang








--
Best regards,

Han Hong Fang