Skip to content

Commit

Permalink
Try RBE's Maven mirror before going to Maven Central. (pantsbuild#8647)
Browse files Browse the repository at this point in the history
Should help mitigate any remaining issues with being
throttled by Maven Central.
  • Loading branch information
benjyw authored Nov 18, 2019
1 parent df16ea4 commit fba248e
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
7 changes: 7 additions & 0 deletions build-support/ivy/ivysettings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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. -->

<!-- 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. -->
<ibiblio name="maven-central-mirror" m2compatible="true" descriptor="required"
root="https://maven-central.storage-download.googleapis.com/repos/central/data"/>

<ibiblio name="maven-central" m2compatible="true" descriptor="required"/>

<!-- The mvn standard local filesystem repo/cache -->
Expand Down
11 changes: 11 additions & 0 deletions pants.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit fba248e

Please sign in to comment.