You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by ti...@apache.org on 2022/01/27 11:22:03 UTC
[maven-surefire] branch master updated: [SUREFIRE-1990] The previous XML report should be deleted before new run or re-run
This is an automated email from the ASF dual-hosted git repository.
tibordigana pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-surefire.git
The following commit(s) were added to refs/heads/master by this push:
new 1b0b59d [SUREFIRE-1990] The previous XML report should be deleted before new run or re-run
1b0b59d is described below
commit 1b0b59d9fb52f6bdde94c30d84f0cae6c14a359f
Author: Tibor Digaňa <ti...@apache.org>
AuthorDate: Thu Jan 27 12:20:45 2022 +0100
[SUREFIRE-1990] The previous XML report should be deleted before new run or re-run
---
.../org/apache/maven/plugin/surefire/report/StatelessXmlReporter.java | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/StatelessXmlReporter.java b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/StatelessXmlReporter.java
index 5431069..984bd94 100644
--- a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/StatelessXmlReporter.java
+++ b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/StatelessXmlReporter.java
@@ -346,9 +346,8 @@ public class StatelessXmlReporter
throws IOException
{
File reportFile = getReportFile( testSetReportEntry );
-
File reportDir = reportFile.getParentFile();
-
+ reportFile.delete();
//noinspection ResultOfMethodCallIgnored
reportDir.mkdirs();
return new BufferedOutputStream( new FileOutputStream( reportFile ), 64 * 1024 );