org.dom4j*;version="[1.6,2)",
org.springframework*;version="[3,4)",
org.slf4j;resolution:=optional,
- org.apache.maven,
- org.apache.maven.project,
+ org.apache.maven.repository.internal,
+ org.sonatype.aether.connector.file,
+ org.sonatype.aether.impl,
+ org.sonatype.aether.spi.connector,
+ org.sonatype.aether.transfer,
org.sonatype.aether,
org.sonatype.aether.artifact,
org.sonatype.aether.collection,
org.sonatype.aether.graph,
org.sonatype.aether.impl.internal,
org.sonatype.aether.repository,
- org.sonatype.aether.resolution,
org.sonatype.aether.util,
- org.sonatype.aether.util.artifact,
- org.sonatype.aether.version
+ org.sonatype.aether.util.artifact
</Import-Package>
</instructions>
</configuration>
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;
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;
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;
}
- 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 );