summaryrefslogtreecommitdiffstats
path: root/archiva-modules/plugins
diff options
context:
space:
mode:
authorOlivier Lamy <olamy@apache.org>2012-04-02 15:02:12 +0000
committerOlivier Lamy <olamy@apache.org>2012-04-02 15:02:12 +0000
commit01fd2d285abb93d9ddf75eab09bca43d2404c46a (patch)
tree9914dc5132560914fdd9a251b47e1b69833c85c4 /archiva-modules/plugins
parent599a0a867770e2c8e10c812e6726e242273ebd5a (diff)
downloadarchiva-01fd2d285abb93d9ddf75eab09bca43d2404c46a.tar.gz
archiva-01fd2d285abb93d9ddf75eab09bca43d2404c46a.zip
avoid creating temp directory in repository directory
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1308376 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-modules/plugins')
-rw-r--r--archiva-modules/plugins/maven2-repository/pom.xml1
-rw-r--r--archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/metadata/repository/storage/maven2/RepositoryModelResolver.java13
2 files changed, 3 insertions, 11 deletions
diff --git a/archiva-modules/plugins/maven2-repository/pom.xml b/archiva-modules/plugins/maven2-repository/pom.xml
index 157257c46..47de02dea 100644
--- a/archiva-modules/plugins/maven2-repository/pom.xml
+++ b/archiva-modules/plugins/maven2-repository/pom.xml
@@ -200,6 +200,7 @@
org.apache.maven.index*,
org.apache.maven.wagon*,
org.codehaus.plexus*,
+ com.google.common.io,
org.codehaus.redback.components*,
org.dom4j*;version="[1.6,2)",
org.springframework*;version="[3,4)",
diff --git a/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/metadata/repository/storage/maven2/RepositoryModelResolver.java b/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/metadata/repository/storage/maven2/RepositoryModelResolver.java
index d3dc6e969..946e2f610 100644
--- a/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/metadata/repository/storage/maven2/RepositoryModelResolver.java
+++ b/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/metadata/repository/storage/maven2/RepositoryModelResolver.java
@@ -19,6 +19,7 @@ package org.apache.archiva.metadata.repository.storage.maven2;
* under the License.
*/
+import com.google.common.io.Files;
import org.apache.archiva.admin.model.beans.ManagedRepository;
import org.apache.archiva.admin.model.beans.NetworkProxy;
import org.apache.archiva.admin.model.beans.RemoteRepository;
@@ -424,17 +425,7 @@ public class RepositoryModelResolver
private File createWorkingDirectory( String targetRepository )
{
- try
- {
- File tmpDir = File.createTempFile( ".workingdirectory", null, new File( targetRepository ) );
- tmpDir.delete();
- tmpDir.mkdirs();
- return tmpDir;
- }
- catch ( IOException e )
- {
- throw new RuntimeException( "Could not create working directory for this request", e );
- }
+ return Files.createTempDir();
}
private void moveFileIfExists( File fileToMove, File directory )