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 54310696fd..984bd94178 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 @@ private OutputStream getOutputStream( WrappedReportEntry testSetReportEntry ) throws IOException { File reportFile = getReportFile( testSetReportEntry ); - File reportDir = reportFile.getParentFile(); - + reportFile.delete(); //noinspection ResultOfMethodCallIgnored reportDir.mkdirs(); return new BufferedOutputStream( new FileOutputStream( reportFile ), 64 * 1024 );