From 92653160c0e31cd32e11c99d337368f146e4d807 Mon Sep 17 00:00:00 2001 From: Tamas Cservenak Date: Tue, 13 Jun 2023 20:39:55 +0200 Subject: [PATCH] Fix for tmp file creation --- .../java/org/apache/maven/plugins/shade/mojo/ShadeMojo.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/apache/maven/plugins/shade/mojo/ShadeMojo.java b/src/main/java/org/apache/maven/plugins/shade/mojo/ShadeMojo.java index 5563df79..396bed16 100644 --- a/src/main/java/org/apache/maven/plugins/shade/mojo/ShadeMojo.java +++ b/src/main/java/org/apache/maven/plugins/shade/mojo/ShadeMojo.java @@ -1057,8 +1057,9 @@ private void rewriteDependencyReducedPomIfWeHaveReduction( model.setDependencies(dependencies); if (generateUniqueDependencyReducedPom) { - dependencyReducedPomLocation = - File.createTempFile("dependency-reduced-pom-", ".xml", project.getBasedir()); + dependencyReducedPomLocation = Files.createTempFile( + project.getBasedir().toPath(), "dependency-reduced-pom-", ".xml") + .toFile(); project.getProperties() .setProperty( "maven.shade.dependency-reduced-pom",