build: scope vendor repos to fix flaky dependency resolution#3000
Merged
Conversation
Dependency resolution intermittently failed in CI with
"Could not resolve us.dynmap:DynmapCoreAPI:3.4". Root cause was
repository query order, not missing artifacts: Gradle queries every
repo in declaration order for each artifact, and repo.fancyplugins.de
returning HTTP 520 (a 5xx = hard error) aborted resolution before the
authoritative Dynmap/MomiRealms repos were ever reached.
Scope each vendor group to its authoritative repo with exclusiveContent
so fragile hosts are never queried for groups they don't host, and one
host's outage can no longer cascade into unrelated groups:
- us.dynmap -> repo.mikeprimm.com
- net.momirealms -> repo.momirealms.net
- lol.pyr -> repo.pyr.lol
- de.oliver -> repo.fancyinnovations.com (migrated from the now
offline repo.fancyplugins.de)
- com.github.puregero (MultiLib) -> Clojars (its com.github.* group was
falling through to a jitpack 404)
Verified with `gradlew dependencies --refresh-dependencies`: all
previously-failing artifacts resolve, no FAILED entries.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0153KLwL66bB31pTc4BtsTMd
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Problem
CI intermittently fails in
:compileJavawith:The root cause is repository query order, not missing artifacts. Gradle queries every repository in declaration order for each artifact until one answers. When resolving
us.dynmap:*it reachesrepo.clojars.organdrepo.fancyplugins.debefore the authoritative Dynmap repo — andrepo.fancyplugins.dereturning HTTP 520 (a 5xx = hard error) aborts resolution beforerepo.mikeprimm.comis ever reached. (clojars404s are benign; the 520 is fatal.)Fixing that unmasked two further latent breakages that the early abort had been hiding:
de.oliver(FancyNpcs/FancyHolograms) —repo.fancyplugins.deis now offline; the repo migrated torepo.fancyinnovations.com.com.github.puregero:multilib— itscom.github.*group is claimed by jitpack (which 404s it); the artifact is actually published to Clojars.Fix
Scope every vendor group to its authoritative repo with
exclusiveContent, so fragile hosts are never queried for groups they don't host and one host's outage can't cascade into unrelated groups:us.dynmapnet.momirealmslol.pyrde.olivercom.github.puregero(MultiLib)No dependency versions were changed.
Verification
./gradlew dependencies --configuration compileClasspath --refresh-dependencies(cold cache) →BUILD SUCCESSFUL, zeroFAILEDentries. All eight previously-failing coordinates (DynmapCoreAPI,dynmap-api,craft-engine-bukkit/core,FancyNpcs,FancyHolograms,znpcsplus-api,multilib) resolve.Merge order
Please merge this before #2999 — it fixes the CI dependency resolution that #2999's build depends on.
🤖 Generated with Claude Code
https://claude.ai/code/session_0153KLwL66bB31pTc4BtsTMd