use of org.gradle.api.internal.artifacts.repositories.maven.MavenMetadataLoader 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);
return new MavenResolver(getName(), rootUri, transport, locallyAvailableResourceFinder, artifactFileStore, moduleIdentifierFactory, metadataSources, MavenMetadataArtifactProvider.INSTANCE, mavenMetadataLoader);
}
use of org.gradle.api.internal.artifacts.repositories.maven.MavenMetadataLoader in project gradle by gradle.
the class DefaultMavenLocalArtifactRepository method createRealResolver.
protected MavenResolver createRealResolver() {
URI rootUri = getUrl();
if (rootUri == null) {
throw new InvalidUserDataException("You must specify a URL for a Maven repository.");
}
RepositoryTransport transport = getTransport(rootUri.getScheme());
MavenMetadataLoader mavenMetadataLoader = new MavenMetadataLoader(transport.getResourceAccessor(), getResourcesFileStore());
MavenResolver resolver = new MavenResolver(getName(), rootUri, transport, getLocallyAvailableResourceFinder(), getArtifactFileStore(), moduleIdentifierFactory, createMetadataSources(mavenMetadataLoader), MavenMetadataArtifactProvider.INSTANCE, mavenMetadataLoader);
for (URI repoUrl : getArtifactUrls()) {
resolver.addArtifactLocation(repoUrl);
}
return resolver;
}
Aggregations