]> source.dussan.org Git - archiva.git/commitdiff
Moved some of the methods over to IO FileUtils. There is no DirectoryScanner yet...
authorHenri Yandell <bayard@apache.org>
Sat, 9 Dec 2006 01:01:08 +0000 (01:01 +0000)
committerHenri Yandell <bayard@apache.org>
Sat, 9 Dec 2006 01:01:08 +0000 (01:01 +0000)
git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@484870 13f79535-47bb-0310-9956-ffa450edef68

archiva-reports-standard/src/main/java/org/apache/maven/archiva/reporting/processor/ChecksumArtifactReportProcessor.java
archiva-reports-standard/src/main/java/org/apache/maven/archiva/reporting/processor/ChecksumMetadataReportProcessor.java
archiva-reports-standard/src/test/java/org/apache/maven/archiva/reporting/processor/DuplicateArtifactFileReportProcessorTest.java
archiva-reports-standard/src/test/java/org/apache/maven/archiva/reporting/processor/OldSnapshotArtifactReportProcessorTest.java
archiva-reports-standard/src/test/java/org/apache/maven/archiva/reporting/reporter/AbstractChecksumArtifactReporterTestCase.java

index 5dc3e26450f0367690b6292de1d28e89a594f533..6bbc035f2fa663836058cf3a27fa9a2820bc6fc6 100644 (file)
@@ -23,7 +23,7 @@ import org.apache.maven.archiva.reporting.processor.ArtifactReportProcessor;
 import org.apache.maven.archiva.reporting.database.ReportingDatabase;
 import org.codehaus.plexus.digest.Digester;
 import org.codehaus.plexus.digest.DigesterException;
-import org.codehaus.plexus.util.FileUtils;
+import org.apache.commons.io.FileUtils;
 
 import java.io.File;
 import java.io.IOException;
@@ -77,7 +77,7 @@ public class ChecksumArtifactReportProcessor
         {
             try
             {
-                digester.verify( file, FileUtils.fileRead( checksumFile ) );
+                digester.verify( file, FileUtils.readFileToString( checksumFile, null ) );
             }
             catch ( DigesterException e )
             {
index 81a558e8b93acbfff43d8756e19ecfd5d5973e9d..fe239f36dea3468c8fe47e2ba03dead5e47e06e6 100644 (file)
@@ -22,7 +22,7 @@ import org.apache.maven.archiva.reporting.processor.MetadataReportProcessor;
 import org.apache.maven.archiva.reporting.database.ReportingDatabase;
 import org.codehaus.plexus.digest.Digester;
 import org.codehaus.plexus.digest.DigesterException;
-import org.codehaus.plexus.util.FileUtils;
+import org.apache.commons.io.FileUtils;
 
 import java.io.File;
 import java.io.IOException;
@@ -78,7 +78,7 @@ public class ChecksumMetadataReportProcessor
         {
             try
             {
-                digester.verify( file, FileUtils.fileRead( checksumFile ) );
+                digester.verify( file, FileUtils.readFileToString( checksumFile, null ) );
             }
             catch ( DigesterException e )
             {
index 5f8e39dae48d05c728c90af3e52bc43247aecf51..107d614efc69e4a529fb75854f47d522a4775e68 100644 (file)
@@ -26,7 +26,7 @@ import org.apache.maven.archiva.reporting.database.ReportingDatabase;
 import org.apache.maven.artifact.Artifact;
 import org.apache.maven.artifact.factory.ArtifactFactory;
 import org.apache.maven.model.Model;
-import org.codehaus.plexus.util.FileUtils;
+import org.apache.commons.io.FileUtils;
 
 import java.io.File;
 import java.util.Collections;
index 55a5be32c778f408ecfbcdcce3b1ae80a4fbf525..9f7cb1da0a7445d7b9beba013f97bed371e77343 100644 (file)
@@ -23,7 +23,7 @@ import org.apache.maven.archiva.reporting.processor.ArtifactReportProcessor;
 import org.apache.maven.archiva.reporting.AbstractRepositoryReportsTestCase;
 import org.apache.maven.archiva.reporting.database.ReportingDatabase;
 import org.apache.maven.artifact.Artifact;
-import org.codehaus.plexus.util.FileUtils;
+import org.apache.commons.io.FileUtils;
 
 import java.io.File;
 import java.text.SimpleDateFormat;
@@ -109,7 +109,7 @@ public class OldSnapshotArtifactReportProcessorTest
         dir.mkdirs();
 
         String date = new SimpleDateFormat( "yyyyMMdd.HHmmss" ).format( new Date() );
-        FileUtils.fileWrite( new File( dir, "artifactId-1.0-alpha-1-" + date + "-1.jar" ).getAbsolutePath(), "foo" );
+        FileUtils.writeStringToFile( new File( dir, "artifactId-1.0-alpha-1-" + date + "-1.jar" ), "foo", null );
 
         Artifact artifact =
             createArtifactFromRepository( repository, "groupId", "artifactId", "1.0-alpha-1-" + date + "-1" );
@@ -129,8 +129,8 @@ public class OldSnapshotArtifactReportProcessorTest
         String date = new SimpleDateFormat( "yyyyMMdd.HHmmss" ).format( new Date() );
         for ( int i = 1; i <= 5; i++ )
         {
-            FileUtils.fileWrite( new File( dir, "artifactId-1.0-alpha-1-" + date + "-" + i + ".jar" ).getAbsolutePath(),
-                                 "foo" );
+            FileUtils.writeStringToFile( new File( dir, "artifactId-1.0-alpha-1-" + date + "-" + i + ".jar" ),
+                                 "foo", null );
         }
 
         for ( int i = 1; i <= 5; i++ )
index a9dea30434387db84cf78ba5f756c5f61191d47a..e6547b4f0e34f9969a082e754870d920a8562318 100644 (file)
@@ -18,7 +18,7 @@ package org.apache.maven.archiva.reporting.reporter;
 
 import org.codehaus.plexus.digest.Digester;
 import org.codehaus.plexus.digest.DigesterException;
-import org.codehaus.plexus.util.FileUtils;
+import org.apache.commons.io.FileUtils;
 import org.apache.commons.io.IOUtils;
 import org.apache.maven.archiva.reporting.AbstractRepositoryReportsTestCase;