Build: drop the retired sonatype-public-repository plugin repository - #6975
Merged
Conversation
The nightly samples shard died in 2.8s, before a single test ran: Plugin org.apache.maven.plugins:maven-install-plugin:3.1.4 or one of its dependencies could not be resolved: Could not transfer artifact ... from/to sonatype-public-repository (https://ossrh-staging-api.central.sonatype.com/content/groups/public): status code: 400, reason phrase: Bad Request (400) That endpoint is gone. Every path under the group now answers 400 with "Endpoint /content/groups/public/... not supported. Please contact Central Support" - the root, maven-metadata.xml and any artifact alike. It was the only entry in <pluginRepositories>, so it was consulted ahead of Central for every plugin the build resolves. The <repositories> block above it already points ossrh at repo1.maven.org; the plugin repository was left behind on the dead Nexus-style path. The OSSRH public group was a proxy of Central plus staging snapshots, and snapshots were disabled here, so it never served anything Central does not - removing it loses no coordinate. Only one of the eight nightly shards failed because the other seven restored a Maven cache that already held maven-install-plugin:3.1.4 and never hit the network for it. Any shard whose cache misses a plugin fails, so a pom.xml change that invalidates the cache key would have taken the whole matrix down. Verified with a full-reactor `mvn dependency:resolve-plugins` against an empty local repository: BUILD SUCCESS, 551 artifacts downloaded, every request to repo.maven.apache.org or repo1.maven.org and none to ossrh-staging-api. Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
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.
The failure
The nightly
samplesshard on H2 (run 33142663391) died after 2.8 s — before a single test ran:The endpoint is retired
Every path under that group answers 400 with an explicit message — the root,
maven-metadata.xml, and any artifact alike:The same POM is
200fromrepo1.maven.org.Why it takes the build down
sonatype-public-repositorywas the only entry in<pluginRepositories>, so it was consulted ahead of Central for every plugin the build resolves. The<repositories>block directly above it already pointsossrhatrepo1.maven.org— the plugin repository was simply left behind on the dead Nexus-style path.Only one of the eight nightly shards failed because the other seven restored a Maven cache that already held
maven-install-plugin:3.1.4and never hit the network for it. Any shard whose cache misses a plugin fails, so this is flaky-by-cache: apom.xmlchange invalidating thehashFiles('**/pom.xml')cache key would have taken the whole matrix down at once.The fix
Delete the block. The OSSRH public group was a proxy of Central plus staging snapshots, and
<snapshots>was already disabled here, so it never served a coordinate Central does not — Central (implicit from the super-POM) covers every plugin the build uses.Verification
Full-reactor
mvn dependency:resolve-pluginsagainst an empty local repository, with the block removed:BUILD SUCCESS, all modulesrepo.maven.apache.orgorrepo1.maven.org; zero toossrh-staging-apiOut of scope, but worth a look
<distributionManagement>still uses the same host for snapshots (/content/repositories/snapshots) and staging deploys. Releases go throughcentral-publishing-maven-pluginwithextensions=true, which supplies its own deploy path, so the release train is probably unaffected — but a plainmvn deployof a SNAPSHOT would hit the same retired/content/prefix. Left untouched here to keep this change to the one line of breakage that is proven.