aboutsummaryrefslogtreecommitdiffstats
path: root/archiva-cli/src
diff options
context:
space:
mode:
Diffstat (limited to 'archiva-cli/src')
-rw-r--r--archiva-cli/src/main/java/org/apache/maven/archiva/cli/ArchivaCli.java21
1 files changed, 1 insertions, 20 deletions
diff --git a/archiva-cli/src/main/java/org/apache/maven/archiva/cli/ArchivaCli.java b/archiva-cli/src/main/java/org/apache/maven/archiva/cli/ArchivaCli.java
index 3f5b03872..a9824e8ac 100644
--- a/archiva-cli/src/main/java/org/apache/maven/archiva/cli/ArchivaCli.java
+++ b/archiva-cli/src/main/java/org/apache/maven/archiva/cli/ArchivaCli.java
@@ -23,7 +23,6 @@ import org.apache.commons.cli.CommandLine;
import org.apache.commons.cli.Option;
import org.apache.commons.cli.Options;
import org.apache.commons.lang.StringUtils;
-import org.apache.maven.archiva.common.utils.DateUtil;
import org.apache.maven.archiva.configuration.ArchivaConfiguration;
import org.apache.maven.archiva.consumers.ConsumerException;
import org.apache.maven.archiva.consumers.RepositoryContentConsumer;
@@ -40,7 +39,6 @@ import org.codehaus.plexus.tools.cli.AbstractCli;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
-import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
@@ -187,24 +185,7 @@ public class ArchivaCli
RepositoryContentStatistics stats = scanner.scan( repo, knownConsumerList, invalidConsumerList,
ignoredContent, RepositoryScanner.FRESH_SCAN );
- SimpleDateFormat df = new SimpleDateFormat();
- System.out.println( "" );
- System.out.println( ".\\ Scan of " + repo.getId() + " \\.__________________________________________" );
- System.out.println( " Repository URL : " + repo.getUrl() );
- System.out.println( " Repository Name : " + repo.getModel().getName() );
- System.out.println( " Repository Layout : " + repo.getModel().getLayoutName() );
- System.out.println( " Consumers : (" + knownConsumerList.size() + " active)" );
- for ( Iterator iter = knownConsumerList.iterator(); iter.hasNext(); )
- {
- RepositoryContentConsumer consumer = (RepositoryContentConsumer) iter.next();
- System.out.println( " " + consumer.getId() + " - " + consumer.getDescription() );
- }
- System.out.println( " Duration : " + DateUtil.getDuration( stats.getDuration() ) );
- System.out.println( " When Gathered : " + df.format( stats.getWhenGathered() ) );
- System.out.println( " Total File Count : " + stats.getTotalFileCount() );
- long averageMsPerFile = ( stats.getDuration() / stats.getTotalFileCount() );
- System.out.println( " Avg Time Per File : " + DateUtil.getDuration( averageMsPerFile ) );
- System.out.println( "______________________________________________________________" );
+ System.out.println( "\n" + stats.toDump( repo ) );
}
catch ( RepositoryException e )
{