Return-Path: Delivered-To: apmail-maven-dev-archive@maven.apache.org Received: (qmail 49845 invoked by uid 500); 3 Jun 2003 08:58:46 -0000 Mailing-List: contact dev-help@maven.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Maven Developers List" Reply-To: "Maven Developers List" Delivered-To: mailing list dev@maven.apache.org Received: (qmail 49801 invoked from network); 3 Jun 2003 08:58:43 -0000 Received: from smtp-ft1.fr.colt.net (213.41.78.25) by daedalus.apache.org with SMTP; 3 Jun 2003 08:58:43 -0000 Received: from vma (host.242.109.41.213.rev.coltfrance.com [213.41.109.242]) by smtp-ft1.fr.colt.net with ESMTP id h538wsj22248 for ; Tue, 3 Jun 2003 10:58:54 +0200 From: "Vincent Massol" To: "'Maven Developers List'" Subject: RE: maven.bat and -Xmx, remove MAVEN_DEFAULT_OPTS? Date: Tue, 3 Jun 2003 10:58:34 +0200 Message-ID: <004901c329ae$5208c2a0$26dea8c0@vma> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.4024 Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 In-Reply-To: <3EDC5F00.6000006@whitesmiths.com.au> X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N > -----Original Message----- > From: Matt Johnson [mailto:johnsonm@whitesmiths.com.au] > Sent: 03 June 2003 10:41 > To: Maven Developers List > Subject: Re: maven.bat and -Xmx, remove MAVEN_DEFAULT_OPTS? > > How 'bout just defaulting MAVEN_OPTS if and only if it ain't already set > (see attached diff). This basically abolishes MAVEN_DEFAULT_OPTS and > sets MAVEN_OPTS if it's not already set. If the user sets it at all, it > overrides the -Xmx160m. I think it is a step forward and I could live with this. It is not perfect in the sense that it does not perform a real "merge" of MAVEN_OPTS and MAVEN_DEFAULT_OPTS params but I think it is good enough and is certainly the easiest solution. dIon, what do you think? Can I commit this? Thanks -Vincent > > (Disclaimer: Works On My Machine) > > > Matt > > Vincent Massol wrote: > > > > > > >>-----Original Message----- > >>From: news [mailto:news@main.gmane.org] On Behalf Of dIon Gillard > >>Sent: 03 June 2003 04:20 > >>To: dev@maven.apache.org > >>Subject: Re: maven.bat and -Xmx, remove MAVEN_DEFAULT_OPTS? > >> > >>Vincent Massol wrote: > >> > >> > >> > >>>>Isn't this what MAVEN_OPTS is for? > >>>> > >>>>The user can set stuff in MAVEN_OPTS and override the defaults.... > >>>> > >>>> > >>>hum... are you saying that the following works: > >>> > >>>java -Xmx160m -Xmx256m [...] > >>> > >>>? > >>> > >>>Even if it works, it doesn't look like a valid solution but more > >>> > >>> > >like a > > > > > >>>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 > >> > >> > >functionality. > > > >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: dev-unsubscribe@maven.apache.org > >>For additional commands, e-mail: dev-help@maven.apache.org > >> > >> > > > > > > > >--------------------------------------------------------------------- > >To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org > >For additional commands, e-mail: dev-help@maven.apache.org > > > > > > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org For additional commands, e-mail: dev-help@maven.apache.org