*/
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 );
- tmpDir.delete();
- tmpDir.mkdirs();
- return tmpDir;
- }
- catch ( IOException e )
- {
- throw new RuntimeException( "Could not create working directory for this request", e );
- } */
return Files.createTempDir();
}
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)",
* 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;
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 )