From 0fe0fa5a6f9e532d78b4104f4f8f103d46123413 Mon Sep 17 00:00:00 2001 From: Joakim Erdfelt Date: Wed, 17 Oct 2007 17:46:40 +0000 Subject: [PATCH] Correcting path resolution logic. git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@585598 13f79535-47bb-0310-9956-ffa450edef68 --- .../legacy/LegacyConverterArtifactConsumer.java | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/archiva-base/archiva-converter/src/main/java/org/apache/maven/archiva/converter/legacy/LegacyConverterArtifactConsumer.java b/archiva-base/archiva-converter/src/main/java/org/apache/maven/archiva/converter/legacy/LegacyConverterArtifactConsumer.java index fe83b6ec3..b319f88dc 100644 --- a/archiva-base/archiva-converter/src/main/java/org/apache/maven/archiva/converter/legacy/LegacyConverterArtifactConsumer.java +++ b/archiva-base/archiva-converter/src/main/java/org/apache/maven/archiva/converter/legacy/LegacyConverterArtifactConsumer.java @@ -26,7 +26,8 @@ import org.apache.maven.archiva.consumers.KnownRepositoryContentConsumer; import org.apache.maven.archiva.converter.artifact.ArtifactConversionException; import org.apache.maven.archiva.converter.artifact.ArtifactConverter; import org.apache.maven.archiva.model.ArtifactReference; -import org.apache.maven.archiva.repository.layout.BidirectionalRepositoryLayout; +import org.apache.maven.archiva.repository.ManagedRepositoryContent; +import org.apache.maven.archiva.repository.content.ManagedDefaultRepositoryContent; import org.apache.maven.archiva.repository.layout.LayoutException; import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.factory.ArtifactFactory; @@ -60,11 +61,8 @@ public class LegacyConverterArtifactConsumer */ private ArtifactFactory artifactFactory; - /** - * @plexus.requirement role-hint="legacy" - */ - private BidirectionalRepositoryLayout bidirectionalLayout; - + private ManagedRepositoryContent managedRepository; + private ArtifactRepository destinationRepository; private List includes; @@ -82,7 +80,8 @@ public class LegacyConverterArtifactConsumer public void beginScan( ManagedRepositoryConfiguration repository ) throws ConsumerException { - + this.managedRepository = new ManagedDefaultRepositoryContent(); + this.managedRepository.setRepository( repository ); } public void completeScan() @@ -105,7 +104,7 @@ public class LegacyConverterArtifactConsumer { try { - ArtifactReference reference = bidirectionalLayout.toArtifactReference( path ); + ArtifactReference reference = managedRepository.toArtifactReference( path ); Artifact artifact = artifactFactory.createArtifact( reference.getGroupId(), reference.getArtifactId(), reference.getVersion(), reference.getClassifier(), reference.getType() ); -- 2.39.5