mirror of https://github.com/apache/archiva.git
Adapting cli to the new repository api
This commit is contained in:
parent
3dc85427b3
commit
2f131c666a
|
@ -19,10 +19,10 @@ package org.apache.archiva.cli;
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
import org.apache.archiva.admin.model.beans.ManagedRepository;
|
||||
import org.apache.archiva.consumers.AbstractMonitoredConsumer;
|
||||
import org.apache.archiva.consumers.ConsumerException;
|
||||
import org.apache.archiva.consumers.RepositoryContentConsumer;
|
||||
import org.apache.archiva.repository.ManagedRepository;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
|
|
|
@ -21,13 +21,14 @@ package org.apache.archiva.cli;
|
|||
|
||||
import com.sampullara.cli.Args;
|
||||
import com.sampullara.cli.Argument;
|
||||
import org.apache.archiva.admin.model.beans.ManagedRepository;
|
||||
import org.apache.archiva.consumers.ConsumerException;
|
||||
import org.apache.archiva.consumers.InvalidRepositoryContentConsumer;
|
||||
import org.apache.archiva.consumers.KnownRepositoryContentConsumer;
|
||||
import org.apache.archiva.consumers.RepositoryContentConsumer;
|
||||
import org.apache.archiva.converter.RepositoryConversionException;
|
||||
import org.apache.archiva.converter.legacy.LegacyRepositoryConverter;
|
||||
import org.apache.archiva.repository.BasicManagedRepository;
|
||||
import org.apache.archiva.repository.ManagedRepository;
|
||||
import org.apache.archiva.repository.scanner.RepositoryScanStatistics;
|
||||
import org.apache.archiva.repository.scanner.RepositoryScanner;
|
||||
import org.apache.archiva.repository.scanner.RepositoryScannerException;
|
||||
|
@ -47,6 +48,7 @@ import java.util.Arrays;
|
|||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.Properties;
|
||||
|
||||
|
@ -166,10 +168,8 @@ public class ArchivaCli
|
|||
private void doScan( String path, String[] consumers )
|
||||
throws ConsumerException, MalformedURLException
|
||||
{
|
||||
ManagedRepository repo = new ManagedRepository();
|
||||
repo.setId( Paths.get( path ).getFileName().toString());
|
||||
repo.setName( "Archiva CLI Provided Repo" );
|
||||
repo.setLocation( path );
|
||||
BasicManagedRepository repo = new BasicManagedRepository( Paths.get(path).getFileName().toString(), "Archiva CLI Provided Repo" );
|
||||
repo.setLocation( Paths.get(path).toUri() );
|
||||
|
||||
List<KnownRepositoryContentConsumer> knownConsumerList = new ArrayList<>();
|
||||
|
||||
|
|
Loading…
Reference in New Issue