From: Henri Yandell Date: Sat, 9 Dec 2006 00:50:06 +0000 (+0000) Subject: Updating to use IO FileUtils rather than Plexus FileUtils. This project doesn't build... X-Git-Tag: archiva-0.9-alpha-1~228 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=1e1c940df68db14da11269705239fc9bc214d90a;p=archiva.git Updating to use IO FileUtils rather than Plexus FileUtils. This project doesn't build however - there are imports missing. git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@484866 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/archiva-sandbox/archiva-repository-assembler/src/main/java/org/apache/maven/archiva/repository/assembly/DefaultRepositoryAssembler.java b/archiva-sandbox/archiva-repository-assembler/src/main/java/org/apache/maven/archiva/repository/assembly/DefaultRepositoryAssembler.java index 8ec5c8547..c8114ba73 100644 --- a/archiva-sandbox/archiva-repository-assembler/src/main/java/org/apache/maven/archiva/repository/assembly/DefaultRepositoryAssembler.java +++ b/archiva-sandbox/archiva-repository-assembler/src/main/java/org/apache/maven/archiva/repository/assembly/DefaultRepositoryAssembler.java @@ -31,7 +31,7 @@ import org.apache.maven.artifact.resolver.filter.AndArtifactFilter; import org.apache.maven.artifact.resolver.filter.ArtifactFilter; import org.apache.maven.artifact.resolver.filter.ScopeArtifactFilter; import org.codehaus.plexus.logging.AbstractLogEnabled; -import org.codehaus.plexus.util.FileUtils; +import org.apache.commons.io.FileUtils; import org.apache.commons.io.IOUtils; import java.io.File; @@ -160,7 +160,7 @@ public class DefaultRepositoryAssembler // the assembly we previously populated. FileUtils.deleteDirectory( repositoryDirectory ); - FileUtils.mkdir( repositoryDirectory.getAbsolutePath() ); + repositoryDirectory.mkdirs(); for ( Iterator i = result.getArtifacts().iterator(); i.hasNext(); ) { @@ -304,10 +304,10 @@ public class DefaultRepositoryAssembler String md5 = DigestUtils.createChecksum( file, "MD5" ); String sha1 = DigestUtils.createChecksum( file, "SHA-1" ); - FileUtils.fileWrite( new File( file.getParentFile(), file.getName() + ".md5" ).getAbsolutePath(), md5 - .toLowerCase() ); - FileUtils.fileWrite( new File( file.getParentFile(), file.getName() + ".sha1" ).getAbsolutePath(), sha1 - .toLowerCase() ); + FileUtils.writeStringToFile( new File( file.getParentFile(), file.getName() + ".md5" ), + md5.toLowerCase(), null ); + FileUtils.writeStringToFile( new File( file.getParentFile(), file.getName() + ".sha1" ), + sha1.toLowerCase(), null ); } catch ( NoSuchAlgorithmException e ) {