summaryrefslogtreecommitdiffstats
path: root/archiva-cli
diff options
context:
space:
mode:
authorJoakim Erdfelt <joakime@apache.org>2007-10-08 22:07:39 +0000
committerJoakim Erdfelt <joakime@apache.org>2007-10-08 22:07:39 +0000
commit8af86cd884b34ecfa98c6a42d2975fdd45c48fff (patch)
tree3747df8c304e8c84090f325abab84775e961db6e /archiva-cli
parent4b9cf4b9298b9906ae4975146706e6a870349e43 (diff)
downloadarchiva-8af86cd884b34ecfa98c6a42d2975fdd45c48fff.tar.gz
archiva-8af86cd884b34ecfa98c6a42d2975fdd45c48fff.zip
Finishing the Repository split work that brett started.
ArchivaRepository has been removed from model. This work was needed before repository layout/detection proposal work is started. git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@582987 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-cli')
-rw-r--r--archiva-cli/src/main/java/org/apache/maven/archiva/cli/AbstractProgressConsumer.java4
-rw-r--r--archiva-cli/src/main/java/org/apache/maven/archiva/cli/ArchivaCli.java12
-rw-r--r--archiva-cli/src/main/java/org/apache/maven/archiva/cli/ProjectReaderConsumer.java8
3 files changed, 14 insertions, 10 deletions
diff --git a/archiva-cli/src/main/java/org/apache/maven/archiva/cli/AbstractProgressConsumer.java b/archiva-cli/src/main/java/org/apache/maven/archiva/cli/AbstractProgressConsumer.java
index 36229c844..6e916fa19 100644
--- a/archiva-cli/src/main/java/org/apache/maven/archiva/cli/AbstractProgressConsumer.java
+++ b/archiva-cli/src/main/java/org/apache/maven/archiva/cli/AbstractProgressConsumer.java
@@ -19,10 +19,10 @@ package org.apache.maven.archiva.cli;
* under the License.
*/
+import org.apache.maven.archiva.configuration.ManagedRepositoryConfiguration;
import org.apache.maven.archiva.consumers.AbstractMonitoredConsumer;
import org.apache.maven.archiva.consumers.ConsumerException;
import org.apache.maven.archiva.consumers.RepositoryContentConsumer;
-import org.apache.maven.archiva.model.ArchivaRepository;
/**
* AbstractProgressConsumer
@@ -36,7 +36,7 @@ public abstract class AbstractProgressConsumer
{
private int count = 0;
- public void beginScan( ArchivaRepository repository )
+ public void beginScan( ManagedRepositoryConfiguration repository )
throws ConsumerException
{
this.count = 0;
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 fbbe7593f..f4c358d09 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
@@ -24,13 +24,14 @@ import org.apache.commons.cli.Option;
import org.apache.commons.cli.Options;
import org.apache.commons.lang.StringUtils;
import org.apache.maven.archiva.configuration.ArchivaConfiguration;
+import org.apache.maven.archiva.configuration.ManagedRepositoryConfiguration;
import org.apache.maven.archiva.consumers.ConsumerException;
import org.apache.maven.archiva.consumers.RepositoryContentConsumer;
import org.apache.maven.archiva.converter.RepositoryConversionException;
import org.apache.maven.archiva.converter.legacy.LegacyRepositoryConverter;
-import org.apache.maven.archiva.model.ArchivaRepository;
import org.apache.maven.archiva.model.RepositoryContentStatistics;
import org.apache.maven.archiva.repository.RepositoryException;
+import org.apache.maven.archiva.repository.scanner.RepositoryScanStatistics;
import org.apache.maven.archiva.repository.scanner.RepositoryScanner;
import org.codehaus.plexus.PlexusContainer;
import org.codehaus.plexus.component.repository.exception.ComponentLookupException;
@@ -167,7 +168,10 @@ public class ArchivaCli
{
String path = cli.getOptionValue( SCAN );
- ArchivaRepository repo = new ArchivaRepository( "cliRepo", "Archiva CLI Provided Repo", "file://" + path );
+ ManagedRepositoryConfiguration repo = new ManagedRepositoryConfiguration();
+ repo.setId( "cliRepo" );
+ repo.setName( "Archiva CLI Provided Repo" );
+ repo.setLocation( path );
List knownConsumerList = new ArrayList();
@@ -182,8 +186,8 @@ public class ArchivaCli
try
{
- RepositoryContentStatistics stats = scanner.scan( repo, knownConsumerList, invalidConsumerList,
- ignoredContent, RepositoryScanner.FRESH_SCAN );
+ RepositoryScanStatistics stats = scanner.scan( repo, knownConsumerList, invalidConsumerList,
+ ignoredContent, RepositoryScanner.FRESH_SCAN );
System.out.println( "\n" + stats.toDump( repo ) );
}
diff --git a/archiva-cli/src/main/java/org/apache/maven/archiva/cli/ProjectReaderConsumer.java b/archiva-cli/src/main/java/org/apache/maven/archiva/cli/ProjectReaderConsumer.java
index 537060c06..1a6511270 100644
--- a/archiva-cli/src/main/java/org/apache/maven/archiva/cli/ProjectReaderConsumer.java
+++ b/archiva-cli/src/main/java/org/apache/maven/archiva/cli/ProjectReaderConsumer.java
@@ -19,10 +19,10 @@ package org.apache.maven.archiva.cli;
* under the License.
*/
+import org.apache.maven.archiva.configuration.ManagedRepositoryConfiguration;
import org.apache.maven.archiva.consumers.ConsumerException;
import org.apache.maven.archiva.consumers.RepositoryContentConsumer;
import org.apache.maven.archiva.model.ArchivaProjectModel;
-import org.apache.maven.archiva.model.ArchivaRepository;
import org.apache.maven.archiva.repository.project.ProjectModelException;
import org.apache.maven.archiva.repository.project.ProjectModelReader;
import org.apache.maven.archiva.repository.project.readers.ProjectModel400Reader;
@@ -57,7 +57,7 @@ public class ProjectReaderConsumer
private ProjectModelReader reader;
- private ArchivaRepository repo;
+ private ManagedRepositoryConfiguration repo;
private List includes;
@@ -94,7 +94,7 @@ public class ProjectReaderConsumer
return includes;
}
- public void beginScan( ArchivaRepository repository )
+ public void beginScan( ManagedRepositoryConfiguration repository )
throws ConsumerException
{
super.beginScan( repository );
@@ -106,7 +106,7 @@ public class ProjectReaderConsumer
{
super.processFile( path );
- File pomFile = new File( repo.getUrl().getPath(), path );
+ File pomFile = new File( repo.getLocation(), path );
try
{
ArchivaProjectModel model = reader.read( pomFile );