(Disclaimer: Works On My Machine)
Matt
Vincent Massol wrote:
like a-----Original Message----- From: news [mailto:[EMAIL PROTECTED] On Behalf Of dIon Gillard Sent: 03 June 2003 04:20 To: [EMAIL PROTECTED] Subject: Re: maven.bat and -Xmx, remove MAVEN_DEFAULT_OPTS?
Vincent Massol wrote:
Isn't this what MAVEN_OPTS is for?hum... are you saying that the following works:
The user can set stuff in MAVEN_OPTS and override the defaults....
java -Xmx160m -Xmx256m [...]
?
Even if it works, it doesn't look like a valid solution but more
functionality.trick to me. What do you think?
I think I was the one that changed the batch file to use MAVEN_DEFAULT_OPTS and MAVEN_OPTS, and I wasn't trying to be tricky, I was trying to get a solution.
It seemed to work for me, so I committed it. It also allows running of
maven in a debugger etc, so I'd rather not get rid of the
Ok. I don't think you get me. I'm not saying to get rid of MAVEN_OPTS, quite the opposite. This is excellent and suit my need.
What I would like to get rid of, is the MAVEN_DEFAULT_OPTS because it is set with the arbitrary value "-Xmx160m".
Let me explain even more... In maven.bat, there is:
%MAVEN_JAVA_EXE% [...]%MAVEN_ENDORSED% %MAVEN_DEFAULT_OPTS% %MAVEN_OPTS% [...]
So, if I set my MAVEN_OPTS environment variable to be "-Xmx256m" for example, the command line will look like:
java [...] -Xmx160m -Xmx256m [...]
and I don't recall a rule of the "java" executable saying that it is allowed to have the same parameter twice on the command line and that the second one will be used! I may be wrong, in which case, please point me to the documentation :-)
Normally maven site wont work without a fair chunk of memory, and the
defaults didn't work, hence MAVEN_DEFAULT_OPTS.
This is exactly the reason I need to override it! 160m is really too low for our reactor. It needs over 1GB! (we have several hundreds of projects and we've had to run them by chunks).
Thus this magical number will maybe solve the problem for *you* but not for everyone. So I see 2 solutions:
- remove the MAVEN_DEFAULT_OPTS and let the user augment the memory if the default 64m is not enough - somehow verify if -Xmx is in MAVEN_OPTS and if so remove it from MAVEN_DEFAULT_OPTS (same for any other parameter).
Back to the original point, I can't see why the user should have to
change the batch file....
For the reason above... :-)
I hope it is clearer now.
Thanks -Vincent
-- dIon Gillard, Multitask Consulting Blog: http://www.freeroller.net/page/dion/Weblog Work: http://www.multitask.com.au
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
maven_bat.diff
Description: application/macbinary
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
