Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -92,21 +92,11 @@ public void execute() throws MojoExecutionException, MojoFailureException {

getLog().info("[MAVEN-CORE-IT-LOG] Creating output file " + outputFile);

OutputStream out = null;
try {
outputFile.getParentFile().mkdirs();
out = new FileOutputStream(outputFile);
outputFile.getParentFile().mkdirs();
try (OutputStream out = new FileOutputStream(outputFile)) {
loaderProperties.store(out, "MAVEN-CORE-IT-LOG");
} catch (IOException e) {
throw new MojoExecutionException("Output file could not be created: " + outputFile, e);
} finally {
if (out != null) {
try {
out.close();
} catch (IOException e) {
// just ignore
}
}
throw new MojoExecutionException(e);
}

getLog().info("[MAVEN-CORE-IT-LOG] Created output file " + outputFile);
Expand Down