mirror of https://github.com/apache/archiva.git
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:
parent
1e1c940df6
commit
69a394c10f
|
@ -23,7 +23,7 @@ import org.apache.maven.archiva.reporting.processor.ArtifactReportProcessor;
|
||||||
import org.apache.maven.archiva.reporting.database.ReportingDatabase;
|
import org.apache.maven.archiva.reporting.database.ReportingDatabase;
|
||||||
import org.codehaus.plexus.digest.Digester;
|
import org.codehaus.plexus.digest.Digester;
|
||||||
import org.codehaus.plexus.digest.DigesterException;
|
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.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
@ -77,7 +77,7 @@ public class ChecksumArtifactReportProcessor
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
digester.verify( file, FileUtils.fileRead( checksumFile ) );
|
digester.verify( file, FileUtils.readFileToString( checksumFile, null ) );
|
||||||
}
|
}
|
||||||
catch ( DigesterException e )
|
catch ( DigesterException e )
|
||||||
{
|
{
|
||||||
|
|
|
@ -22,7 +22,7 @@ import org.apache.maven.archiva.reporting.processor.MetadataReportProcessor;
|
||||||
import org.apache.maven.archiva.reporting.database.ReportingDatabase;
|
import org.apache.maven.archiva.reporting.database.ReportingDatabase;
|
||||||
import org.codehaus.plexus.digest.Digester;
|
import org.codehaus.plexus.digest.Digester;
|
||||||
import org.codehaus.plexus.digest.DigesterException;
|
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.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
@ -78,7 +78,7 @@ public class ChecksumMetadataReportProcessor
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
digester.verify( file, FileUtils.fileRead( checksumFile ) );
|
digester.verify( file, FileUtils.readFileToString( checksumFile, null ) );
|
||||||
}
|
}
|
||||||
catch ( DigesterException e )
|
catch ( DigesterException e )
|
||||||
{
|
{
|
||||||
|
|
|
@ -26,7 +26,7 @@ import org.apache.maven.archiva.reporting.database.ReportingDatabase;
|
||||||
import org.apache.maven.artifact.Artifact;
|
import org.apache.maven.artifact.Artifact;
|
||||||
import org.apache.maven.artifact.factory.ArtifactFactory;
|
import org.apache.maven.artifact.factory.ArtifactFactory;
|
||||||
import org.apache.maven.model.Model;
|
import org.apache.maven.model.Model;
|
||||||
import org.codehaus.plexus.util.FileUtils;
|
import org.apache.commons.io.FileUtils;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
|
|
|
@ -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.AbstractRepositoryReportsTestCase;
|
||||||
import org.apache.maven.archiva.reporting.database.ReportingDatabase;
|
import org.apache.maven.archiva.reporting.database.ReportingDatabase;
|
||||||
import org.apache.maven.artifact.Artifact;
|
import org.apache.maven.artifact.Artifact;
|
||||||
import org.codehaus.plexus.util.FileUtils;
|
import org.apache.commons.io.FileUtils;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
|
@ -109,7 +109,7 @@ public class OldSnapshotArtifactReportProcessorTest
|
||||||
dir.mkdirs();
|
dir.mkdirs();
|
||||||
|
|
||||||
String date = new SimpleDateFormat( "yyyyMMdd.HHmmss" ).format( new Date() );
|
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 =
|
Artifact artifact =
|
||||||
createArtifactFromRepository( repository, "groupId", "artifactId", "1.0-alpha-1-" + date + "-1" );
|
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() );
|
String date = new SimpleDateFormat( "yyyyMMdd.HHmmss" ).format( new Date() );
|
||||||
for ( int i = 1; i <= 5; i++ )
|
for ( int i = 1; i <= 5; i++ )
|
||||||
{
|
{
|
||||||
FileUtils.fileWrite( new File( dir, "artifactId-1.0-alpha-1-" + date + "-" + i + ".jar" ).getAbsolutePath(),
|
FileUtils.writeStringToFile( new File( dir, "artifactId-1.0-alpha-1-" + date + "-" + i + ".jar" ),
|
||||||
"foo" );
|
"foo", null );
|
||||||
}
|
}
|
||||||
|
|
||||||
for ( int i = 1; i <= 5; i++ )
|
for ( int i = 1; i <= 5; i++ )
|
||||||
|
|
|
@ -18,7 +18,7 @@ package org.apache.maven.archiva.reporting.reporter;
|
||||||
|
|
||||||
import org.codehaus.plexus.digest.Digester;
|
import org.codehaus.plexus.digest.Digester;
|
||||||
import org.codehaus.plexus.digest.DigesterException;
|
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.commons.io.IOUtils;
|
||||||
import org.apache.maven.archiva.reporting.AbstractRepositoryReportsTestCase;
|
import org.apache.maven.archiva.reporting.AbstractRepositoryReportsTestCase;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue