]> source.dussan.org Git - archiva.git/commitdiff
use guava to create temp directory
authorOlivier Lamy <olamy@apache.org>
Mon, 2 Apr 2012 15:01:28 +0000 (15:01 +0000)
committerOlivier Lamy <olamy@apache.org>
Mon, 2 Apr 2012 15:01:28 +0000 (15:01 +0000)
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
archiva-modules/archiva-base/archiva-proxy/src/main/java/org/apache/archiva/proxy/DefaultRepositoryProxyConnectors.java

index 7855c6b038f00f2e7a2240a36b217c0527578c71..2a27f44722b35fc6a74f41752ee48ca98915789c 100644 (file)
               org.apache.maven.wagon.authentication,
               org.apache.maven.wagon.proxy,
               org.apache.maven.wagon.repository,
+              com.google.common.io,
               org.slf4j;resolution:=optional
             </Import-Package>
           </instructions>
index c4614bfe29e9b4ebf9b49c6d9357620d2121e023..d51afc5ae73617b749d5ef47f6f77b9375704f90 100644 (file)
@@ -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();
     }
 
     /**