use of org.sonatype.aether.impl.internal.DefaultDeployer in project gradle by gradle.
the class AbstractMavenPublishAction method newRepositorySystem.
private RepositorySystem newRepositorySystem() {
try {
DefaultDeployer deployer = (DefaultDeployer) getContainer().lookup(Deployer.class);
// This is a workaround for https://issues.gradle.org/browse/GRADLE-3324.
// Somehow the ArrayList 'result' in `org.sonatype.aether.impl.internal.Utils#sortMetadataGeneratorFactories` ends up
// being a list of nulls on windows and IBM's 1.6 JDK.
deployer.setMetadataFactories(null);
deployer.addMetadataGeneratorFactory(new VersionsMetadataGeneratorFactory());
deployer.addMetadataGeneratorFactory(new SnapshotMetadataGeneratorFactory());
deployer.addMetadataGeneratorFactory(snapshotVersionManager);
return container.lookup(RepositorySystem.class);
} catch (ComponentLookupException e) {
throw UncheckedException.throwAsUncheckedException(e);
}
}
Aggregations