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;
*/
private ArtifactFactory artifactFactory;
- /**
- * @plexus.requirement role-hint="legacy"
- */
- private BidirectionalRepositoryLayout bidirectionalLayout;
-
+ private ManagedRepositoryContent managedRepository;
+
private ArtifactRepository destinationRepository;
private List includes;
public void beginScan( ManagedRepositoryConfiguration repository )
throws ConsumerException
{
-
+ this.managedRepository = new ManagedDefaultRepositoryContent();
+ this.managedRepository.setRepository( repository );
}
public void completeScan()
{
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() );