|
|
|
I have the same issue. I use Maven 2.0.4 with the 2.2 plugin. I had to force Maven to use of version 2.1.3 to work around the problem.
I also have the problem using Maven 2.0.4 with the 2.2 plugin. If however I set <forkMode>always</forkMode> the results are not cumulative.
I also see this problem. It has definitely only started happening since 2.2. If I add
<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>2.1.3</version> </plugin> Things start working again. The linked issue MSUREFIRE-149 has a test project setup that seems to cause this problem consistently. My experience re: the forkMode setting is that it happens less frequently with forkMode == always, but it does still seem to happen Hi,
Got the same problem. (maven 2.0.4, surefireplugin 2.3-SNAPSHOT) Tracking a little bit shows that 2.1.3 plugin use surefire-booter 1.5.3 and 2.2 use surefire-booter 2.0 . I think the problem comes from there. Stéphane The fix for this is quite easy: need to override the reset() method for the XMLReporter and clear the list of tests there.
Attached is the patch for the XMLReporter that fixes the problem
For anyone else who stumbles upon this, the workaround above (using the 2.1.3 plugin) has its own set of issues.
The default values of a few of the configuration arguments for the surefire plugin changed between 2.1.3 and 2.2. The two I've come across were:
The changes in these defaults can cause issues (I got OOM errors and problems with the XML classloaders) that are somewhat hard to diagnose, partially because the 2.2 plugin documentation doesn't indicate that the defaults had changed between versions. (For example, the only reason I noticed the forkmode problem is because I was dumping the running Java processes in order to diagnose the OOM). |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
It only seems to have been doing this since I started using Maven 2.0.4, with maven-surefire-plugin 2.2 instead of maven 2.0.2 with pluginh 2.1.2.