You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by noner <re...@yahoo.co.uk> on 2007/04/24 17:09:27 UTC

heap space problem with surefire unit tests

HI,
I'd really appreciate any help with the following.
I run a single unit test in Eclipse without any problems. 
Running the same unit test through Maven, without eclipse running, fails
with the following message:
ERROR!
java.lang.OutOfMemoryError: Java heap space
java.lang.OutOfMemoryError: Java heap space

I've tried the following surefire configuration based on similar message in
this forum:

<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<version>2.3</version>
				<configuration>
					<forkMode>none</forkMode>
					<argLine>-Xms256m -Xmx512m -XX:PermSize=512m
-XX:MaxPermSize=512m</argLine>
					<disableXmlReport>true</disableXmlReport>
				</configuration>
			</plugin>


Thanks in advance.
-- 
View this message in context: http://www.nabble.com/heap-space-problem-with-surefire-unit-tests-tf3639294s177.html#a10163077
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: heap space problem with surefire unit tests

Posted by noner <re...@yahoo.co.uk>.
OK. The problem was the fork command. Remove the fork and the heap space
problem no longer occurs.


noner wrote:
> 
> HI,
> I'd really appreciate any help with the following.
> I run a single unit test in Eclipse without any problems. 
> Running the same unit test through Maven, without eclipse running, fails
> with the following message:
> ERROR!
> java.lang.OutOfMemoryError: Java heap space
> java.lang.OutOfMemoryError: Java heap space
> 
> I've tried the following surefire configuration based on similar message
> in this forum:
> 
> <plugin>
> 				<groupId>org.apache.maven.plugins</groupId>
> 				<artifactId>maven-surefire-plugin</artifactId>
> 				<version>2.3</version>
> 				<configuration>
> 					<forkMode>none</forkMode>
> 					<argLine>-Xms256m -Xmx512m -XX:PermSize=512m
> -XX:MaxPermSize=512m</argLine>
> 					<disableXmlReport>true</disableXmlReport>
> 				</configuration>
> 			</plugin>
> 
> 
> Thanks in advance.
> 

-- 
View this message in context: http://www.nabble.com/heap-space-problem-with-surefire-unit-tests-tf3639294s177.html#a10164131
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