From 599a0a867770e2c8e10c812e6726e242273ebd5a Mon Sep 17 00:00:00 2001 From: Olivier Lamy Date: Mon, 2 Apr 2012 15:01:28 +0000 Subject: [PATCH] use guava to create temp directory git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1308375 13f79535-47bb-0310-9956-ffa450edef68 --- archiva-modules/archiva-base/archiva-proxy/pom.xml | 1 + .../archiva/proxy/DefaultRepositoryProxyConnectors.java | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/archiva-modules/archiva-base/archiva-proxy/pom.xml b/archiva-modules/archiva-base/archiva-proxy/pom.xml index 7855c6b03..2a27f4472 100644 --- a/archiva-modules/archiva-base/archiva-proxy/pom.xml +++ b/archiva-modules/archiva-base/archiva-proxy/pom.xml @@ -190,6 +190,7 @@ org.apache.maven.wagon.authentication, org.apache.maven.wagon.proxy, org.apache.maven.wagon.repository, + com.google.common.io, org.slf4j;resolution:=optional diff --git a/archiva-modules/archiva-base/archiva-proxy/src/main/java/org/apache/archiva/proxy/DefaultRepositoryProxyConnectors.java b/archiva-modules/archiva-base/archiva-proxy/src/main/java/org/apache/archiva/proxy/DefaultRepositoryProxyConnectors.java index c4614bfe2..d51afc5ae 100644 --- a/archiva-modules/archiva-base/archiva-proxy/src/main/java/org/apache/archiva/proxy/DefaultRepositoryProxyConnectors.java +++ b/archiva-modules/archiva-base/archiva-proxy/src/main/java/org/apache/archiva/proxy/DefaultRepositoryProxyConnectors.java @@ -20,6 +20,7 @@ package org.apache.archiva.proxy; */ import com.google.common.collect.Lists; +import com.google.common.io.Files; import org.apache.archiva.admin.model.RepositoryAdminException; import org.apache.archiva.admin.model.beans.NetworkProxy; import org.apache.archiva.admin.model.networkproxy.NetworkProxyAdmin; @@ -1009,6 +1010,7 @@ public class DefaultRepositoryProxyConnectors private File createWorkingDirectory( ManagedRepositoryContent repository ) { // TODO: This is ugly - lets actually clean this up when we get the new repository api + /* try { File tmpDir = File.createTempFile( ".workingdirectory", null ); @@ -1019,7 +1021,8 @@ public class DefaultRepositoryProxyConnectors catch ( IOException e ) { throw new RuntimeException( "Could not create working directory for this request", e ); - } + } */ + return Files.createTempDir(); } /** -- 2.39.5