Moved some of the methods over to IO FileUtils. There is no DirectoryScanner yet or a copyDirectoryStructure method. See https://issues.apache.org/jira/browse/IO-105 for a request for the latter.

git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@484870 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Henri Yandell 2006-12-09 01:01:08 +00:00
parent 1e1c940df6
commit 69a394c10f
5 changed files with 10 additions and 10 deletions

View 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 )
{

View 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 )
{

View 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;

View 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++ )

View 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;