From 919a5ac3eb725dc676e81fcbf868f3cc165598a4 Mon Sep 17 00:00:00 2001 From: Olivier Lamy Date: Tue, 13 Sep 2011 12:12:39 +0000 Subject: [MRM-1504] Add a new module for repository administration management split the repo admin in two modules : api and default implementation (to be able to more easily change the impl). Use the repo admin api consumers and indexing modules. git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1170135 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/maven/archiva/cli/AbstractProgressConsumer.java | 10 +++++----- .../src/main/java/org/apache/maven/archiva/cli/ArchivaCli.java | 3 ++- 2 files changed, 7 insertions(+), 6 deletions(-) (limited to 'archiva-cli') 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 14e7a87fd..c2f220cd0 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,13 +19,13 @@ package org.apache.maven.archiva.cli; * under the License. */ -import java.util.Date; - -import org.apache.maven.archiva.configuration.ManagedRepositoryConfiguration; +import org.apache.archiva.admin.model.managed.ManagedRepository; import org.apache.maven.archiva.consumers.AbstractMonitoredConsumer; import org.apache.maven.archiva.consumers.ConsumerException; import org.apache.maven.archiva.consumers.RepositoryContentConsumer; +import java.util.Date; + /** * AbstractProgressConsumer * @@ -37,13 +37,13 @@ public abstract class AbstractProgressConsumer { private int count = 0; - public void beginScan( ManagedRepositoryConfiguration repository, Date whenGathered ) + public void beginScan( ManagedRepository repository, Date whenGathered ) throws ConsumerException { this.count = 0; } - public void beginScan( ManagedRepositoryConfiguration repository, Date whenGathered, boolean executeOnEntireRepo ) + public void beginScan( ManagedRepository repository, Date whenGathered, boolean executeOnEntireRepo ) throws ConsumerException { beginScan( repository, whenGathered ); 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 a5e5adc06..43d6e76a1 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 @@ -21,6 +21,7 @@ package org.apache.maven.archiva.cli; import com.sampullara.cli.Args; import com.sampullara.cli.Argument; +import org.apache.archiva.admin.model.managed.ManagedRepository; import org.apache.archiva.common.plexusbridge.PlexusSisuBridge; import org.apache.archiva.common.plexusbridge.PlexusSisuBridgeException; import org.apache.archiva.repository.scanner.RepositoryScanStatistics; @@ -165,7 +166,7 @@ public class ArchivaCli WagonManager wagonManager = plexusSisuBridge.lookup( WagonManager.class ); wagonManager.addMirror( "internal", "*", new File( path ).toURL().toExternalForm() ); - ManagedRepositoryConfiguration repo = new ManagedRepositoryConfiguration(); + ManagedRepository repo = new ManagedRepository(); repo.setId( "cliRepo" ); repo.setName( "Archiva CLI Provided Repo" ); repo.setLocation( path ); -- cgit v1.2.3