From fba248e6dd76e129d2c5b75731c202ccc2caddb4 Mon Sep 17 00:00:00 2001 From: Benjy Weinberger Date: Mon, 18 Nov 2019 14:36:57 -0800 Subject: [PATCH] Try RBE's Maven mirror before going to Maven Central. (#8647) Should help mitigate any remaining issues with being throttled by Maven Central. --- build-support/ivy/ivysettings.xml | 7 +++++++ pants.ini | 11 +++++++++++ 2 files changed, 18 insertions(+) diff --git a/build-support/ivy/ivysettings.xml b/build-support/ivy/ivysettings.xml index 05daf1e17fa..9a1fecf7016 100644 --- a/build-support/ivy/ivysettings.xml +++ b/build-support/ivy/ivysettings.xml @@ -26,6 +26,13 @@ Licensed under the Apache License, Version 2.0 (see LICENSE). This can lead to jars downloading without their transitive deps which leads to confusing failures later when classpaths are constructed and used. We setup the maven central resolver to require successful pom downloads here. --> + + + + diff --git a/pants.ini b/pants.ini index 8d37324a080..88488ff88a3 100644 --- a/pants.ini +++ b/pants.ini @@ -451,6 +451,17 @@ enable_libc_search: True [sourcefile-validation] config: @build-support/regexes/config.yaml +[coursier] +repos: [ + # First try RBE's maven central mirror, as we can get throttled by + # maven central due to all RBE traffic appearing to them as coming from a single IP. + # There's no harm in trying this even outside RBE, as it is world-visible. + 'https://maven-central.storage-download.googleapis.com/repos/central/data', + 'https://repo1.maven.org/maven2', + # Custom repo for Kythe jars, as Google doesn't currently publish them anywhere. + 'https://raw.githubusercontent.com/toolchainlabs/binhost/master/' + ] + [cache.resolve.coursier] # Only use local artifact for coursier because the cache content contains abs path # and is not portable. That said, if remote cache is enabled, this would not break