diff --git a/src/main/java/org/apache/maven/plugins/install/InstallFileMojo.java b/src/main/java/org/apache/maven/plugins/install/InstallFileMojo.java index a006dace..e826a58c 100644 --- a/src/main/java/org/apache/maven/plugins/install/InstallFileMojo.java +++ b/src/main/java/org/apache/maven/plugins/install/InstallFileMojo.java @@ -340,7 +340,7 @@ private File readingPomFromJarFile() { base = base.substring( 0, base.lastIndexOf( '.' ) ); } - pomFile = File.createTempFile( base, ".pom" ); + pomFile = Files.createTempFile( base, ".pom" ).toFile(); pomOutputStream = Files.newOutputStream( pomFile.toPath() ); @@ -498,7 +498,7 @@ private File generatePomFile() Writer writer = null; try { - File pomFile = File.createTempFile( "mvninstall", ".pom" ); + File pomFile = Files.createTempFile( "mvninstall", ".pom" ).toFile(); writer = new XmlStreamWriter( pomFile ); new MavenXpp3Writer().write( writer, model );