Search in sources :

Example 1 with MavenResolver

use of org.gradle.api.internal.artifacts.repositories.resolver.MavenResolver 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);
}
Also used : MavenResolver(org.gradle.api.internal.artifacts.repositories.resolver.MavenResolver) ComponentMetadataSupplierDetails(org.gradle.api.artifacts.ComponentMetadataSupplierDetails) Instantiator(org.gradle.internal.reflect.Instantiator) DefaultImmutableMetadataSources(org.gradle.api.internal.artifacts.repositories.metadata.DefaultImmutableMetadataSources) ImmutableMetadataSources(org.gradle.api.internal.artifacts.repositories.metadata.ImmutableMetadataSources) RepositoryTransport(org.gradle.api.internal.artifacts.repositories.transport.RepositoryTransport) MavenMetadataLoader(org.gradle.api.internal.artifacts.repositories.maven.MavenMetadataLoader) ComponentMetadataListerDetails(org.gradle.api.artifacts.ComponentMetadataListerDetails)

Example 2 with MavenResolver

use of org.gradle.api.internal.artifacts.repositories.resolver.MavenResolver in project gradle by gradle.

the class DefaultMavenArtifactRepository method createRealResolver.

protected MavenResolver createRealResolver() {
    URI rootUrl = validateUrl();
    MavenResolver resolver = createResolver(rootUrl);
    for (URI repoUrl : getArtifactUrls()) {
        resolver.addArtifactLocation(repoUrl);
    }
    return resolver;
}
Also used : MavenResolver(org.gradle.api.internal.artifacts.repositories.resolver.MavenResolver) URI(java.net.URI)

Example 3 with MavenResolver

use of org.gradle.api.internal.artifacts.repositories.resolver.MavenResolver 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;
}
Also used : MavenResolver(org.gradle.api.internal.artifacts.repositories.resolver.MavenResolver) Instantiator(org.gradle.internal.reflect.Instantiator) RepositoryTransport(org.gradle.api.internal.artifacts.repositories.transport.RepositoryTransport) MavenMetadataLoader(org.gradle.api.internal.artifacts.repositories.maven.MavenMetadataLoader) URI(java.net.URI)

Aggregations

MavenResolver (org.gradle.api.internal.artifacts.repositories.resolver.MavenResolver)3 URI (java.net.URI)2 MavenMetadataLoader (org.gradle.api.internal.artifacts.repositories.maven.MavenMetadataLoader)2 RepositoryTransport (org.gradle.api.internal.artifacts.repositories.transport.RepositoryTransport)2 Instantiator (org.gradle.internal.reflect.Instantiator)2 ComponentMetadataListerDetails (org.gradle.api.artifacts.ComponentMetadataListerDetails)1 ComponentMetadataSupplierDetails (org.gradle.api.artifacts.ComponentMetadataSupplierDetails)1 DefaultImmutableMetadataSources (org.gradle.api.internal.artifacts.repositories.metadata.DefaultImmutableMetadataSources)1 ImmutableMetadataSources (org.gradle.api.internal.artifacts.repositories.metadata.ImmutableMetadataSources)1