From 4a56f3f2dac0319ad171122380e54c35a146f056 Mon Sep 17 00:00:00 2001 From: tegorov Date: Tue, 4 Oct 2022 17:29:21 +0600 Subject: [PATCH] Fix FileNotFoundException --- README.md | 2 +- pom.xml | 2 +- src/main/java/ru/tegorov/AllureEnvironmentGenerateMojo.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index dbf5835..6716d74 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ This plugin generates [environment.properties](https://docs.qameta.io/allure/#_e com.github.tegorov allure-environment-maven-plugin - 0.1.0 + 0.1.2 diff --git a/pom.xml b/pom.xml index e7e77db..6f492e5 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ com.github.tegorov allure-environment-maven-plugin maven-plugin - 0.1.1 + 0.1.2 ${project.groupId}:${project.artifactId} Maven plugin generating environment.properties for Allure report https://github.com/tegorov/allure-environment-maven-plugin diff --git a/src/main/java/ru/tegorov/AllureEnvironmentGenerateMojo.java b/src/main/java/ru/tegorov/AllureEnvironmentGenerateMojo.java index 09ba5c1..b92c138 100644 --- a/src/main/java/ru/tegorov/AllureEnvironmentGenerateMojo.java +++ b/src/main/java/ru/tegorov/AllureEnvironmentGenerateMojo.java @@ -58,7 +58,7 @@ public void execute() throws MojoExecutionException { File propertiesFile = new File(allureResultsFile, ALLURE_ENVIRONMENT_PROPERTIES); if (propertiesFile.exists()) { - propertiesFile.delete(); + return; } try (FileOutputStream outputStrem = new FileOutputStream(propertiesFile)) {;