summaryrefslogtreecommitdiffstats
path: root/archiva-modules/plugins/maven2-repository/src/main
diff options
context:
space:
mode:
authorOlivier Lamy <olamy@apache.org>2012-08-02 16:23:18 +0000
committerOlivier Lamy <olamy@apache.org>2012-08-02 16:23:18 +0000
commit3e1fb17f0a77eb3693b2090b5a94f07edc5e3d27 (patch)
treeb8a2f6a3fd02bf52f3951928bcd3c35faf05095c /archiva-modules/plugins/maven2-repository/src/main
parentc2aa60f68f68b138f85722a96ea22edb40ce734c (diff)
downloadarchiva-3e1fb17f0a77eb3693b2090b5a94f07edc5e3d27.tar.gz
archiva-3e1fb17f0a77eb3693b2090b5a94f07edc5e3d27.zip
extract our own repository connector factory to an external file
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1368581 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-modules/plugins/maven2-repository/src/main')
-rw-r--r--archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/dependency/tree/maven2/Maven3DependencyTreeBuilder.java58
1 files changed, 1 insertions, 57 deletions
diff --git a/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/dependency/tree/maven2/Maven3DependencyTreeBuilder.java b/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/dependency/tree/maven2/Maven3DependencyTreeBuilder.java
index 04ec05999..af9877e9c 100644
--- a/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/dependency/tree/maven2/Maven3DependencyTreeBuilder.java
+++ b/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/dependency/tree/maven2/Maven3DependencyTreeBuilder.java
@@ -47,7 +47,6 @@ import org.sonatype.aether.RepositorySystemSession;
import org.sonatype.aether.collection.CollectRequest;
import org.sonatype.aether.collection.CollectResult;
import org.sonatype.aether.collection.DependencyCollectionException;
-import org.sonatype.aether.connector.file.FileRepositoryConnectorFactory;
import org.sonatype.aether.graph.Dependency;
import org.sonatype.aether.graph.DependencyVisitor;
import org.sonatype.aether.impl.ArtifactDescriptorReader;
@@ -55,13 +54,7 @@ import org.sonatype.aether.impl.VersionRangeResolver;
import org.sonatype.aether.impl.VersionResolver;
import org.sonatype.aether.impl.internal.DefaultServiceLocator;
import org.sonatype.aether.repository.LocalRepository;
-import org.sonatype.aether.spi.connector.ArtifactDownload;
-import org.sonatype.aether.spi.connector.ArtifactUpload;
-import org.sonatype.aether.spi.connector.MetadataDownload;
-import org.sonatype.aether.spi.connector.MetadataUpload;
-import org.sonatype.aether.spi.connector.RepositoryConnector;
import org.sonatype.aether.spi.connector.RepositoryConnectorFactory;
-import org.sonatype.aether.transfer.NoRepositoryConnectorException;
import org.sonatype.aether.util.artifact.DefaultArtifact;
import org.springframework.stereotype.Service;
@@ -70,7 +63,6 @@ import javax.inject.Inject;
import javax.inject.Named;
import java.io.File;
import java.util.ArrayList;
-import java.util.Collection;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -206,59 +198,11 @@ public class Maven3DependencyTreeBuilder
}
- public static class MyFileRepositoryConnectorFactory
- extends FileRepositoryConnectorFactory
- {
-
- public MyFileRepositoryConnectorFactory()
- {
-
- }
-
- public RepositoryConnector newInstance( RepositorySystemSession session,
- org.sonatype.aether.repository.RemoteRepository repository )
- throws NoRepositoryConnectorException
- {
-
- try
- {
- return super.newInstance( session, repository );
- }
- catch ( NoRepositoryConnectorException e )
- {
-
- }
-
- return new RepositoryConnector()
- {
-
- private Logger log = LoggerFactory.getLogger( getClass() );
-
- public void get( Collection<? extends ArtifactDownload> artifactDownloads,
- Collection<? extends MetadataDownload> metadataDownloads )
- {
- log.debug( "get" );
- }
-
- public void put( Collection<? extends ArtifactUpload> artifactUploads,
- Collection<? extends MetadataUpload> metadataUploads )
- {
- log.debug( "put" );
- }
-
- public void close()
- {
- log.debug( "close" );
- }
- };
- }
- }
-
public static RepositorySystem newRepositorySystem()
{
DefaultServiceLocator locator = new DefaultServiceLocator();
locator.addService( RepositoryConnectorFactory.class,
- MyFileRepositoryConnectorFactory.class );// FileRepositoryConnectorFactory.class );
+ ArchivaRepositoryConnectorFactory.class );// FileRepositoryConnectorFactory.class );
locator.addService( VersionResolver.class, DefaultVersionResolver.class );
locator.addService( VersionRangeResolver.class, DefaultVersionRangeResolver.class );
locator.addService( ArtifactDescriptorReader.class, DefaultArtifactDescriptorReader.class );