aboutsummaryrefslogtreecommitdiffstats
path: root/archiva-modules/archiva-base/archiva-converter/src
diff options
context:
space:
mode:
authorMartin Stockhammer <martin_s@apache.org>2017-11-01 15:38:00 +0100
committerMartin Stockhammer <martin_s@apache.org>2017-11-01 15:38:00 +0100
commit9469c1b67f5a667b99b1810ddd95642164ba2ec3 (patch)
tree320cdc7d6adfde3d0493e1587bd8382fd9a6591b /archiva-modules/archiva-base/archiva-converter/src
parent45b601fd1ffa9277ef88d11ef77204df3948a755 (diff)
downloadarchiva-9469c1b67f5a667b99b1810ddd95642164ba2ec3.tar.gz
archiva-9469c1b67f5a667b99b1810ddd95642164ba2ec3.zip
Adapting base modules to the new repository api
Using the repository api and RepositoryRegistry for repo access
Diffstat (limited to 'archiva-modules/archiva-base/archiva-converter/src')
-rw-r--r--archiva-modules/archiva-base/archiva-converter/src/main/java/org/apache/archiva/converter/legacy/DefaultLegacyRepositoryConverter.java8
-rw-r--r--archiva-modules/archiva-base/archiva-converter/src/main/java/org/apache/archiva/converter/legacy/LegacyConverterArtifactConsumer.java4
2 files changed, 6 insertions, 6 deletions
diff --git a/archiva-modules/archiva-base/archiva-converter/src/main/java/org/apache/archiva/converter/legacy/DefaultLegacyRepositoryConverter.java b/archiva-modules/archiva-base/archiva-converter/src/main/java/org/apache/archiva/converter/legacy/DefaultLegacyRepositoryConverter.java
index ff04828e3..3e8e168f9 100644
--- a/archiva-modules/archiva-base/archiva-converter/src/main/java/org/apache/archiva/converter/legacy/DefaultLegacyRepositoryConverter.java
+++ b/archiva-modules/archiva-base/archiva-converter/src/main/java/org/apache/archiva/converter/legacy/DefaultLegacyRepositoryConverter.java
@@ -26,6 +26,7 @@ import org.apache.archiva.common.utils.PathUtil;
import org.apache.archiva.consumers.InvalidRepositoryContentConsumer;
import org.apache.archiva.consumers.KnownRepositoryContentConsumer;
import org.apache.archiva.converter.RepositoryConversionException;
+import org.apache.archiva.repository.BasicManagedRepository;
import org.apache.archiva.repository.scanner.RepositoryScanner;
import org.apache.archiva.repository.scanner.RepositoryScannerException;
import org.apache.maven.artifact.repository.ArtifactRepository;
@@ -40,6 +41,7 @@ import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
+import java.util.Locale;
/**
* DefaultLegacyRepositoryConverter
@@ -90,10 +92,8 @@ public class DefaultLegacyRepositoryConverter
{
String defaultRepositoryUrl = PathUtil.toUrl( repositoryDirectory );
- ManagedRepository legacyRepository = new ManagedRepository();
- legacyRepository.setId( "legacy" );
- legacyRepository.setName( "Legacy Repository" );
- legacyRepository.setLocation( legacyRepositoryDirectory.toAbsolutePath().toString() );
+ BasicManagedRepository legacyRepository = new BasicManagedRepository( "legacy", "Legacy Repository");
+ legacyRepository.setLocation( legacyRepositoryDirectory.toAbsolutePath().toUri() );
legacyRepository.setLayout( "legacy" );
ArtifactRepository repository =
diff --git a/archiva-modules/archiva-base/archiva-converter/src/main/java/org/apache/archiva/converter/legacy/LegacyConverterArtifactConsumer.java b/archiva-modules/archiva-base/archiva-converter/src/main/java/org/apache/archiva/converter/legacy/LegacyConverterArtifactConsumer.java
index 1dc82a50d..7fb542eb1 100644
--- a/archiva-modules/archiva-base/archiva-converter/src/main/java/org/apache/archiva/converter/legacy/LegacyConverterArtifactConsumer.java
+++ b/archiva-modules/archiva-base/archiva-converter/src/main/java/org/apache/archiva/converter/legacy/LegacyConverterArtifactConsumer.java
@@ -19,7 +19,6 @@ package org.apache.archiva.converter.legacy;
* under the License.
*/
-import org.apache.archiva.admin.model.beans.ManagedRepository;
import org.apache.archiva.common.plexusbridge.PlexusSisuBridge;
import org.apache.archiva.common.plexusbridge.PlexusSisuBridgeException;
import org.apache.archiva.consumers.AbstractMonitoredConsumer;
@@ -28,6 +27,7 @@ import org.apache.archiva.consumers.KnownRepositoryContentConsumer;
import org.apache.archiva.converter.artifact.ArtifactConversionException;
import org.apache.archiva.converter.artifact.ArtifactConverter;
import org.apache.archiva.model.ArtifactReference;
+import org.apache.archiva.repository.ManagedRepository;
import org.apache.archiva.repository.ManagedRepositoryContent;
import org.apache.archiva.repository.content.maven2.ManagedDefaultRepositoryContent;
import org.apache.archiva.repository.layout.LayoutException;
@@ -85,7 +85,7 @@ public class LegacyConverterArtifactConsumer
}
@Override
- public void beginScan( ManagedRepository repository, Date whenGathered )
+ public void beginScan( org.apache.archiva.repository.ManagedRepository repository, Date whenGathered )
throws ConsumerException
{
this.managedRepository = new ManagedDefaultRepositoryContent();