maven-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@multitask.com.au
Subject RE: maven.bat and -Xmx, remove MAVEN_DEFAULT_OPTS?
Date Tue, 03 Jun 2003 21:18:37 GMT
+1 from me
--
dIon Gillard, Multitask Consulting
Blog:      http://www.freeroller.net/page/dion/Weblog
Work:      http://www.multitask.com.au


"Vincent Massol" <vmassol@pivolis.com> wrote on 03/06/2003 06:58:34 PM:

> 
> 
> > -----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
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Mime
View raw message