diff options
author | Martin Stockhammer <martin_s@apache.org> | 2017-11-01 15:36:28 +0100 |
---|---|---|
committer | Martin Stockhammer <martin_s@apache.org> | 2017-11-01 15:36:28 +0100 |
commit | 2f131c666ad40f02ba617abe3f8b4490e3bfc45f (patch) | |
tree | bf500c392e2817a32d8d36819fde96dcdcacd2a5 /archiva-cli/src/main/java/org/apache/archiva/cli/ArchivaCli.java | |
parent | 3dc85427b33f2a045a9e9b460dc906e1f1e5bba5 (diff) | |
download | archiva-2f131c666ad40f02ba617abe3f8b4490e3bfc45f.tar.gz archiva-2f131c666ad40f02ba617abe3f8b4490e3bfc45f.zip |
Adapting cli to the new repository api
Diffstat (limited to 'archiva-cli/src/main/java/org/apache/archiva/cli/ArchivaCli.java')
-rw-r--r-- | archiva-cli/src/main/java/org/apache/archiva/cli/ArchivaCli.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/archiva-cli/src/main/java/org/apache/archiva/cli/ArchivaCli.java b/archiva-cli/src/main/java/org/apache/archiva/cli/ArchivaCli.java index dad00f651..d274c3db3 100644 --- a/archiva-cli/src/main/java/org/apache/archiva/cli/ArchivaCli.java +++ b/archiva-cli/src/main/java/org/apache/archiva/cli/ArchivaCli.java @@ -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<>(); |