You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by hb...@apache.org on 2020/12/13 22:44:54 UTC
[maven-invoker-plugin] 01/01: [MINVOKER-272] use Java 7
Files.createTempDirectory(...) API
This is an automated email from the ASF dual-hosted git repository.
hboutemy pushed a commit to branch MINVOKER-272
in repository https://gitbox.apache.org/repos/asf/maven-invoker-plugin.git
commit a46bf19905ec0560c3119537836b4391e43f44ee
Author: Hervé Boutemy <hb...@apache.org>
AuthorDate: Wed Nov 11 12:24:31 2020 +0100
[MINVOKER-272] use Java 7 Files.createTempDirectory(...) API
---
.../java/org/apache/maven/plugins/invoker/AbstractInvokerMojo.java | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/src/main/java/org/apache/maven/plugins/invoker/AbstractInvokerMojo.java b/src/main/java/org/apache/maven/plugins/invoker/AbstractInvokerMojo.java
index cb4f853..8357948 100644
--- a/src/main/java/org/apache/maven/plugins/invoker/AbstractInvokerMojo.java
+++ b/src/main/java/org/apache/maven/plugins/invoker/AbstractInvokerMojo.java
@@ -1144,9 +1144,7 @@ public abstract class AbstractInvokerMojo
// avoid infinite recursion if the cloneTo path is a subdirectory.
if ( cloneSubdir != null )
{
- File temp = File.createTempFile( "pre-invocation-clone.", "" );
- temp.delete();
- temp.mkdirs();
+ File temp = Files.createTempDirectory( "pre-invocation-clone." ).toFile();
copyDirectoryStructure( projectsDirectory, temp );