You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Lionel van den Berg <li...@gmail.com> on 2009/10/08 06:18:10 UTC
Setting Java heap space
Hi all,
I'm having some issues with Java heap space. To get around this I have added
the line "MAVEN_OPTS=-Xmx128m" to my mvn.bat file.
However, I would prefer to set it on a project by project basis or even on
command line. Is it possible to pass it as an argument when running "mvn
..."? Or can it be added to the POM? I see it can be for the javadoc plugin.
Ideally I only need it in the testing phase.
Any help appreciated.
Cheers
Lionel.
Re: Setting Java heap space
Posted by Lionel van den Berg <li...@gmail.com>.
Oh, right, I was able to use the surefire plugin, great!
Thanks heaps.
Lionel.
2009/10/8 Lionel van den Berg <li...@gmail.com>
> Thanks. It seems there are no ideal solutions but I guess I can work within
> the suggestions made. Just a pain that all developers will have to configure
> their own MAVEN_OPTS which ever way they choose to do it.
>
> Cheers
>
> Lionel
>
>
> 2009/10/8 Edelson, Justin <Ju...@mtvstaff.com>
>
> Did you read this thread:
>> http://www.nabble.com/-Maven%27s-memory--How-to-avoid-adding-the-MAVEN_OPTS-variable--td25788729.html
>>
>> This should answer most of your question. As for setting it on the command
>> line, that's not possible AFAIK. What you can do is create multiple mvn.bat
>> files which have different environment variables in them. I think this is
>> primarily done with debugging (i.e. mvnDebug), but the pattern could be used
>> for memory as well.
>>
>> Justin
>>
>> ________________________________
>>
>> From: Lionel van den Berg [mailto:lionelv@gmail.com]
>> Sent: Thu 10/8/2009 12:18 AM
>> To: users@maven.apache.org
>> Subject: Setting Java heap space
>>
>>
>>
>> Hi all,
>>
>> I'm having some issues with Java heap space. To get around this I have
>> added
>> the line "MAVEN_OPTS=-Xmx128m" to my mvn.bat file.
>>
>> However, I would prefer to set it on a project by project basis or even on
>> command line. Is it possible to pass it as an argument when running "mvn
>> ..."? Or can it be added to the POM? I see it can be for the javadoc
>> plugin.
>> Ideally I only need it in the testing phase.
>>
>> Any help appreciated.
>>
>> Cheers
>>
>> Lionel.
>>
>>
>>
>
Re: Setting Java heap space
Posted by Lionel van den Berg <li...@gmail.com>.
Thanks. It seems there are no ideal solutions but I guess I can work within
the suggestions made. Just a pain that all developers will have to configure
their own MAVEN_OPTS which ever way they choose to do it.
Cheers
Lionel
2009/10/8 Edelson, Justin <Ju...@mtvstaff.com>
> Did you read this thread:
> http://www.nabble.com/-Maven%27s-memory--How-to-avoid-adding-the-MAVEN_OPTS-variable--td25788729.html
>
> This should answer most of your question. As for setting it on the command
> line, that's not possible AFAIK. What you can do is create multiple mvn.bat
> files which have different environment variables in them. I think this is
> primarily done with debugging (i.e. mvnDebug), but the pattern could be used
> for memory as well.
>
> Justin
>
> ________________________________
>
> From: Lionel van den Berg [mailto:lionelv@gmail.com]
> Sent: Thu 10/8/2009 12:18 AM
> To: users@maven.apache.org
> Subject: Setting Java heap space
>
>
>
> Hi all,
>
> I'm having some issues with Java heap space. To get around this I have
> added
> the line "MAVEN_OPTS=-Xmx128m" to my mvn.bat file.
>
> However, I would prefer to set it on a project by project basis or even on
> command line. Is it possible to pass it as an argument when running "mvn
> ..."? Or can it be added to the POM? I see it can be for the javadoc
> plugin.
> Ideally I only need it in the testing phase.
>
> Any help appreciated.
>
> Cheers
>
> Lionel.
>
>
>
RE: Setting Java heap space
Posted by Manu Dhanda <ma...@gmail.com>.
Setting java heap space from command line:
set MAVEN_OPTS= -Xms512m -Xmx512m -XX:MaxPermSize=1024m
-Manu.
justinedelson wrote:
>
> Did you read this thread:
> http://www.nabble.com/-Maven%27s-memory--How-to-avoid-adding-the-MAVEN_OPTS-variable--td25788729.html
>
> This should answer most of your question. As for setting it on the command
> line, that's not possible AFAIK. What you can do is create multiple
> mvn.bat files which have different environment variables in them. I think
> this is primarily done with debugging (i.e. mvnDebug), but the pattern
> could be used for memory as well.
>
> Justin
>
> ________________________________
>
> From: Lionel van den Berg [mailto:lionelv@gmail.com]
> Sent: Thu 10/8/2009 12:18 AM
> To: users@maven.apache.org
> Subject: Setting Java heap space
>
>
>
> Hi all,
>
> I'm having some issues with Java heap space. To get around this I have
> added
> the line "MAVEN_OPTS=-Xmx128m" to my mvn.bat file.
>
> However, I would prefer to set it on a project by project basis or even on
> command line. Is it possible to pass it as an argument when running "mvn
> ..."? Or can it be added to the POM? I see it can be for the javadoc
> plugin.
> Ideally I only need it in the testing phase.
>
> Any help appreciated.
>
> Cheers
>
> Lionel.
>
>
>
>
--
View this message in context: http://www.nabble.com/Setting-Java-heap-space-tp25798134p25982839.html
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
RE: Setting Java heap space
Posted by "Edelson, Justin" <Ju...@mtvstaff.com>.
Did you read this thread: http://www.nabble.com/-Maven%27s-memory--How-to-avoid-adding-the-MAVEN_OPTS-variable--td25788729.html
This should answer most of your question. As for setting it on the command line, that's not possible AFAIK. What you can do is create multiple mvn.bat files which have different environment variables in them. I think this is primarily done with debugging (i.e. mvnDebug), but the pattern could be used for memory as well.
Justin
________________________________
From: Lionel van den Berg [mailto:lionelv@gmail.com]
Sent: Thu 10/8/2009 12:18 AM
To: users@maven.apache.org
Subject: Setting Java heap space
Hi all,
I'm having some issues with Java heap space. To get around this I have added
the line "MAVEN_OPTS=-Xmx128m" to my mvn.bat file.
However, I would prefer to set it on a project by project basis or even on
command line. Is it possible to pass it as an argument when running "mvn
..."? Or can it be added to the POM? I see it can be for the javadoc plugin.
Ideally I only need it in the testing phase.
Any help appreciated.
Cheers
Lionel.