use of org.gradle.api.internal.artifacts.repositories.transport.RepositoryTransport in project gradle by gradle.
the class DefaultMavenArtifactRepository method createResolver.
private MavenResolver createResolver(URI rootUri) {
RepositoryTransport transport = getTransport(rootUri.getScheme());
MavenMetadataLoader mavenMetadataLoader = new MavenMetadataLoader(transport.getResourceAccessor(), resourcesFileStore);
ImmutableMetadataSources metadataSources = createMetadataSources(mavenMetadataLoader);
Instantiator injector = createInjectorForMetadataSuppliers(transport, instantiatorFactory, getUrl(), resourcesFileStore);
InstantiatingAction<ComponentMetadataSupplierDetails> supplier = createComponentMetadataSupplierFactory(injector, isolatableFactory);
InstantiatingAction<ComponentMetadataListerDetails> lister = createComponentMetadataVersionLister(injector, isolatableFactory);
return new MavenResolver(getName(), rootUri, transport, locallyAvailableResourceFinder, artifactFileStore, metadataSources, MavenMetadataArtifactProvider.INSTANCE, mavenMetadataLoader, supplier, lister, injector, checksumService);
}
use of org.gradle.api.internal.artifacts.repositories.transport.RepositoryTransport in project gradle by gradle.
the class DefaultMavenLocalArtifactRepository method createRealResolver.
@Override
protected MavenResolver createRealResolver() {
URI rootUri = validateUrl();
RepositoryTransport transport = getTransport(rootUri.getScheme());
MavenMetadataLoader mavenMetadataLoader = new MavenMetadataLoader(transport.getResourceAccessor(), getResourcesFileStore());
Instantiator injector = createInjectorForMetadataSuppliers(transport, getInstantiatorFactory(), rootUri, getResourcesFileStore());
MavenResolver resolver = new MavenResolver(getName(), rootUri, transport, getLocallyAvailableResourceFinder(), getArtifactFileStore(), createMetadataSources(mavenMetadataLoader), MavenMetadataArtifactProvider.INSTANCE, mavenMetadataLoader, null, null, injector, checksumService);
for (URI repoUrl : getArtifactUrls()) {
resolver.addArtifactLocation(repoUrl);
}
return resolver;
}
use of org.gradle.api.internal.artifacts.repositories.transport.RepositoryTransport in project gradle by gradle.
the class MavenLocalPublisher method publish.
@Override
public void publish(MavenNormalizedPublication publication, @Nullable MavenArtifactRepository artifactRepository) {
LOGGER.info("Publishing to maven local repository");
URI rootUri = mavenRepositoryLocator.getLocalMavenRepository().toURI();
RepositoryTransport transport = repositoryTransportFactory.createFileTransport("mavenLocal");
ExternalResourceRepository repository = transport.getRepository();
publish(publication, repository, rootUri, true);
}
use of org.gradle.api.internal.artifacts.repositories.transport.RepositoryTransport in project gradle by gradle.
the class MavenRemotePublisher method publish.
@Override
public void publish(MavenNormalizedPublication publication, MavenArtifactRepository artifactRepository) {
URI repositoryUrl = artifactRepository.getUrl();
LOGGER.info("Publishing to repository '{}' ({})", artifactRepository.getName(), repositoryUrl);
String protocol = repositoryUrl.getScheme().toLowerCase();
DefaultMavenArtifactRepository realRepository = (DefaultMavenArtifactRepository) artifactRepository;
RepositoryTransport transport = realRepository.getTransport(protocol);
ExternalResourceRepository repository = transport.getRepository();
publish(publication, repository, repositoryUrl, false);
}
use of org.gradle.api.internal.artifacts.repositories.transport.RepositoryTransport in project gradle by gradle.
the class DependencyManagementBuildScopeServices method createTextResourceLoader.
TextResourceLoader createTextResourceLoader(ExternalResourceFileStore resourceFileStore, RepositoryTransportFactory repositoryTransportFactory) {
HashSet<String> schemas = Sets.newHashSet("https", "http");
RepositoryTransport transport = repositoryTransportFactory.createTransport(schemas, "http auth", Collections.<Authentication>emptyList());
ExternalResourceAccessor externalResourceAccessor = new DefaultExternalResourceAccessor(resourceFileStore, transport.getResourceAccessor());
return new DefaultUriTextResourceLoader(externalResourceAccessor, schemas);
}
Aggregations