mirror of https://github.com/apache/archiva.git
Correcting path resolution logic.
git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@585598 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
0427f685c7
commit
0fe0fa5a6f
|
@ -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.ArtifactConversionException;
|
||||||
import org.apache.maven.archiva.converter.artifact.ArtifactConverter;
|
import org.apache.maven.archiva.converter.artifact.ArtifactConverter;
|
||||||
import org.apache.maven.archiva.model.ArtifactReference;
|
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.archiva.repository.layout.LayoutException;
|
||||||
import org.apache.maven.artifact.Artifact;
|
import org.apache.maven.artifact.Artifact;
|
||||||
import org.apache.maven.artifact.factory.ArtifactFactory;
|
import org.apache.maven.artifact.factory.ArtifactFactory;
|
||||||
|
@ -60,10 +61,7 @@ public class LegacyConverterArtifactConsumer
|
||||||
*/
|
*/
|
||||||
private ArtifactFactory artifactFactory;
|
private ArtifactFactory artifactFactory;
|
||||||
|
|
||||||
/**
|
private ManagedRepositoryContent managedRepository;
|
||||||
* @plexus.requirement role-hint="legacy"
|
|
||||||
*/
|
|
||||||
private BidirectionalRepositoryLayout bidirectionalLayout;
|
|
||||||
|
|
||||||
private ArtifactRepository destinationRepository;
|
private ArtifactRepository destinationRepository;
|
||||||
|
|
||||||
|
@ -82,7 +80,8 @@ public class LegacyConverterArtifactConsumer
|
||||||
public void beginScan( ManagedRepositoryConfiguration repository )
|
public void beginScan( ManagedRepositoryConfiguration repository )
|
||||||
throws ConsumerException
|
throws ConsumerException
|
||||||
{
|
{
|
||||||
|
this.managedRepository = new ManagedDefaultRepositoryContent();
|
||||||
|
this.managedRepository.setRepository( repository );
|
||||||
}
|
}
|
||||||
|
|
||||||
public void completeScan()
|
public void completeScan()
|
||||||
|
@ -105,7 +104,7 @@ public class LegacyConverterArtifactConsumer
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
ArtifactReference reference = bidirectionalLayout.toArtifactReference( path );
|
ArtifactReference reference = managedRepository.toArtifactReference( path );
|
||||||
Artifact artifact = artifactFactory.createArtifact( reference.getGroupId(), reference.getArtifactId(),
|
Artifact artifact = artifactFactory.createArtifact( reference.getGroupId(), reference.getArtifactId(),
|
||||||
reference.getVersion(), reference.getClassifier(),
|
reference.getVersion(), reference.getClassifier(),
|
||||||
reference.getType() );
|
reference.getType() );
|
||||||
|
|
Loading…
Reference in New Issue