List of usage examples for org.apache.maven.repository.internal SnapshotMetadataGeneratorFactory SnapshotMetadataGeneratorFactory
SnapshotMetadataGeneratorFactory
From source file:org.gradle.api.publication.maven.internal.action.AbstractMavenPublishAction.java
License:Apache License
private RepositorySystem newRepositorySystem() { try {/*from w w w .j a v a2 s .co m*/ 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); } }