Thanks to you all for the detailed and specific information!
At first I thought that maybe Maven spawns its goals in separate instances
of the JVM (just as one can specify in the Ant "Java" task) so therefore
there might have been a possibility to give an option to maven itself in
order to let this get through to any plugins. So I guess the only way is
indeed to patch the maven.bat file or to specify the environment variable.

regards,
Johan

----- Original Message -----
From: "Lester Ward" <[EMAIL PROTECTED]>
To: "'Maven Users List'" <[EMAIL PROTECTED]>
Sent: Tuesday, January 20, 2004 4:53 PM
Subject: RE: specifying more memory for the JVM


> >> How can I specify that the JVM used by Maven may consume more memory?
>
> > In maven.bat
>
> Specifically, you can pass an argument to any command-line invocation of
> Java, so this is not Maven specific. Maven.bat invokes the JVM with this
> evil line:
>
> %MAVEN_JAVA_EXE%
> -Djavax.xml.parsers.DocumentBuilderFactory=org.apache.xerces.jaxp.Document
Bu
> ilderFactoryImpl
> -Djavax.xml.parsers.SAXParserFactory=org.apache.xerces.jaxp.SAXParserFacto
ry
> Impl "-Dmaven.home=%MAVEN_HOME%" "-Dtools.jar=%JAVA_HOME%\lib\tools.jar"
> "-Dforehead.conf.file=%MAVEN_HOME%\bin\forehead.conf" %MAVEN_ENDORSED%
> %MAVEN_OPTS% -classpath %MAVEN_CLASSPATH% %MAVEN_MAIN_CLASS%
> %MAVEN_CMD_LINE_ARGS%
>
> Which gets expanded to this:
>
> "D:\j2sdk1.4.1\bin\java.exe"
> -Djavax.xml.parsers.DocumentBuilderFactory=org.apache.xerces.jaxp.Document
> BuilderFactoryImpl
> -Djavax.xml.parsers.SAXParserFactory=org.apache.xerces.jaxp.SAXParserFacto
ry
> Impl "-Dmaven.home=D:\Programming
> \Projects\maven" "-Dtools.jar=D:\j2sdk1.4.1\lib\tools.jar"
> "-Dforehead.conf.file=D:\Programming\Project
> s\maven\bin\forehead.conf"
>
"-Djava.endorsed.dirs=D:\j2sdk1.4.1\lib\endorsed;D:\Programming\Projects\mav
> en\lib\endorsed" "-Xmx160m" -classpath
> "D:\Programming\Projects\maven\lib\forehead-1.0-beta-4.jar"
> "com.werken.forehead.Forehead
>
> The key bit is the -Xmx160m part. This controls the memory allocation of
the
> JVM. In the Maven.bat file, this happens to be in the MAVEN_OPTS variable.
> The options you need are:
>
> -Xms<size>        set initial Java heap size
> -Xmx<size>        set maximum Java heap size
> -Xss<size>        set java thread stack size
>
> So, the -Xmx160m option means "set maximum Java heap size to 160MB".
Change
> this to -Xmx256m or whatever.
>
> ---------------------------------------------------------------------
> 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]

Reply via email to