NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

Maven JUnit tests and Heap Size Xmx

 
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Users
View previous topic :: View next topic  
Author Message
DK
Posted via mailing list.





PostPosted: Thu Apr 12, 2012 4:35 pm    Post subject: Maven JUnit tests and Heap Size Xmx Reply with quote

Hi,

Im NetBeans 7.1.1. How do I change the heap size when running my JUnit tests
in a Maven project. I Tried the following but it didn't work:


<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.12</version>
<configuration>
<argLine>-Xmx512M</argLine>
</configuration>
</plugin>



--
View this message in context: http://netbeans-org.1045718.n5.nabble.com/Maven-JUnit-tests-and-Heap-Size-Xmx-tp5636113p5636113.html
Sent from the Netbeans IDE Users mailing list archive at Nabble.com.
Back to top
Milos Kleint
Posted via mailing list.





PostPosted: Fri Apr 13, 2012 1:46 pm    Post subject: Maven JUnit tests and Heap Size Xmx Reply with quote

is the configuration snippet working when built from commmand line? if
so and it's not working from the IDE, try disabling the Compile On
Save - in project properties dialog, Build/Compile panel.. with CoS
on, the tests are sometimes executed with the internal netbeans ant
executor.

Milos



On Thu, Apr 12, 2012 at 6:13 PM, DK <address-removed> wrote:
Quote:
Hi,

Im NetBeans 7.1.1. How do I change the heap size when running my JUnit tests
in a Maven project. I Tried the following but it didn't work:


           <plugin>
               <groupId>org.apache.maven.plugins</groupId>
               <artifactId>maven-surefire-plugin</artifactId>
               <version>2.12</version>
               <configuration>
                   <argLine>-Xmx512M</argLine>
               </configuration>
           </plugin>



--
View this message in context: http://netbeans-org.1045718.n5.nabble.com/Maven-JUnit-tests-and-Heap-Size-Xmx-tp5636113p5636113.html
Sent from the Netbeans IDE Users mailing list archive at Nabble.com.
Back to top
Monezz



Joined: 18 Feb 2009
Posts: 254

PostPosted: Fri Apr 13, 2012 3:58 pm    Post subject: Maven JUnit tests and Heap Size Xmx Reply with quote

Quote:
Im NetBeans 7.1.1. How do I change the heap size when running my JUnit tests
in a Maven project.

You can add the following line to ~/netbeans-7.1.1/etc/netbeans.conf

export MAVEN_OPTS="-Xmx512m -XX:MaxPermSize=256m"

add other options as you please.
I think netbeans should also respect environment variable MAVEN_OPTS
but it only worked for me by putting it netbeans.conf file.

Cheers,
Timon
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo