| View previous topic :: View next topic |
| Author |
Message |
neu242
Joined: 25 Nov 2008 Posts: 9
|
Posted: Wed Nov 26, 2008 8:31 am Post subject: How do I set MAVEN_OPTS? |
|
|
Hi.
I have set MAVEN_OPTS="-Xmx512m -XX:MaxPermSize=128m" in my shell, which I need to compile my large project with maven2. If I start NetBeans from the shell it honors MAVEN_OPTS and my project compiles like it should within the IDE. However, if I start NetBeans by just double clicking it I get java.lang.OutOfMemoryError: Java heap space when compiling.
I have tried adding -J-Xmx512m to netbeans_default_options in /Applications/NetBeans/NetBeans\ 6.5.app/Contents/Resources/NetBeans/etc/netbeans.conf, but that doesn't help. I guess that only affects JAVA_OPTS anyway, and would not work.
How do I set MAVEN_OPTS within NetBeans?
(I'm using MacOSX Leopard on a MacBook Pro with 4GB RAM.) |
|
| Back to top |
|
 |
neu242
Joined: 25 Nov 2008 Posts: 9
|
|
| Back to top |
|
 |
neu242
Joined: 25 Nov 2008 Posts: 9
|
Posted: Wed Nov 26, 2008 9:34 am Post subject: How to set environment variables for NetBeans |
|
|
I finally discovered how to do it. I'm talking to myself here
In ~/.netbeans/6.5/, create etc/netbeans.conf. Add your environment variables there, e.g.:
| Code: | | export MAVEN_OPTS="-Xmx512m -XX:MaxPermSize=128m" |
|
|
| Back to top |
|
 |
kabriel
Joined: 24 Jul 2009 Posts: 2
|
Posted: Fri Jul 24, 2009 12:57 am Post subject: |
|
|
Is this still the only way to change the options for maven?
I need to adjust the heap size used by the maven process, is there any easy way to do this? Is this something that could be easily added to the maven plugin? |
|
| Back to top |
|
 |
mkleint Posted via mailing list.
|
Posted: Fri Jul 24, 2009 8:27 am Post subject: How do I set MAVEN_OPTS? |
|
|
kabriel wrote:
| Quote: | Is this still the only way to change the options for maven?
I need to adjust the heap size used by the maven process, is there any easy way to do this? Is this something that could be easily added to the maven plugin?
| netbeans should be able to pick up the MAVEN_OPTS you have normally in
your OS.\
http://www.netbeans.org/issues/show_bug.cgi?id=166874
Milos |
|
| Back to top |
|
 |
emiddio-verizon Posted via mailing list.
|
Posted: Fri Jul 24, 2009 5:44 pm Post subject: How do I set MAVEN_OPTS? |
|
|
the only way i found -- since i'm not an expert on Maven -- is to
modify the mvn.bat file -- i added
set MAVEN_OPTS=-Xmx512m -Dmaven.test.skip=true %MAVEN_OPTS%
to the file.
i dont want a global environment variable -- and dont know or see a way to
do in in netbeans.
gary
----- Original Message -----
From: "mkleint" <address-removed>
To: <address-removed>
Sent: Friday, July 24, 2009 1:27 AM
Subject: Re: [nbusers] How do I set MAVEN_OPTS?
| Quote: | kabriel wrote:
| Quote: | Is this still the only way to change the options for maven?
I need to adjust the heap size used by the maven process, is there any
easy way to do this? Is this something that could be easily added to the
maven plugin?
| netbeans should be able to pick up the MAVEN_OPTS you have normally in
your OS.\
http://www.netbeans.org/issues/show_bug.cgi?id=166874
Milos |
|
|
| Back to top |
|
 |
mkleint Posted via mailing list.
|
Posted: Fri Jul 24, 2009 5:52 pm Post subject: How do I set MAVEN_OPTS? |
|
|
emiddio-verizon wrote:
| Quote: | the only way i found -- since i'm not an expert on Maven -- is to
modify the mvn.bat file -- i added
set MAVEN_OPTS=-Xmx512m -Dmaven.test.skip=true %MAVEN_OPTS%
to the file.
i dont want a global environment variable -- and dont know or see a
way to do in in netbeans.
| changing the mvn.bat is sort of more "global" that setting the env.
variable. But do what suits you. Please note that with these options
running tests in netbeans might not work. A better way to disable test
execution is to do it in Tools/Options/Misc dialog.
Milos
| Quote: |
gary
----- Original Message ----- From: "mkleint" <address-removed>
To: <address-removed>
Sent: Friday, July 24, 2009 1:27 AM
Subject: Re: [nbusers] How do I set MAVEN_OPTS?
| Quote: | kabriel wrote:
| Quote: | Is this still the only way to change the options for maven?
I need to adjust the heap size used by the maven process, is there
any easy way to do this? Is this something that could be easily
added to the maven plugin?
| netbeans should be able to pick up the MAVEN_OPTS you have normally
in your OS.\
http://www.netbeans.org/issues/show_bug.cgi?id=166874
Milos
|
|
|
|
| Back to top |
|
 |
kabriel
Joined: 24 Jul 2009 Posts: 2
|
Posted: Fri Jul 24, 2009 5:59 pm Post subject: |
|
|
Wouldn't it be great to just have a Options field in the settings dialog that lets you define project specific (or global) options for when you run maven? This could then set the MAVEN_OPTS before executing the mvn command.
Just a thought/request. |
|
| Back to top |
|
 |
Ludovic Champenois Posted via mailing list.
|
Posted: Sat Jul 25, 2009 5:02 pm Post subject: How do I set MAVEN_OPTS? |
|
|
On 7/24/09 10:59 AM, kabriel wrote:
| Quote: | Wouldn't it be great to just have a Options field in the settings dialog that lets you define project specific (or global) options for when you run maven? This could then set the MAVEN_OPTS before executing the mvn command.
Just a thought/request.
| RFE:http://www.netbeans.org/issues/show_bug.cgi?id=166874
Ludo |
|
| Back to top |
|
 |
|