]> source.dussan.org Git - archiva.git/commitdiff
Correcting path resolution logic.
authorJoakim Erdfelt <joakime@apache.org>
Wed, 17 Oct 2007 17:46:40 +0000 (17:46 +0000)
committerJoakim Erdfelt <joakime@apache.org>
Wed, 17 Oct 2007 17:46:40 +0000 (17:46 +0000)
git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@585598 13f79535-47bb-0310-9956-ffa450edef68

archiva-base/archiva-converter/src/main/java/org/apache/maven/archiva/converter/legacy/LegacyConverterArtifactConsumer.java

index fe83b6ec37008408cdf5d7209323efe9adc6859a..b319f88dc7e4d2b7e0b9652ddfb1fcdec77acf8e 100644 (file)
@@ -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() );