ci: #17 (github) Maven Central releases broken - OSSRH sunset migrati…#18
Open
tim-brown wants to merge 2 commits intoocadotechnology:masterfrom
Open
ci: #17 (github) Maven Central releases broken - OSSRH sunset migrati…#18tim-brown wants to merge 2 commits intoocadotechnology:masterfrom
tim-brown wants to merge 2 commits intoocadotechnology:masterfrom
Conversation
… sunset migration required - Update Sonatype URLs to new OSSRH Staging API compatibility layer (ossrh-staging-api.central.sonatype.com) since oss.sonatype.org and s01.oss.sonatype.org were sunset on June 30, 2025 - Update actions/checkout and actions/setup-java to v4 (v1 didn't support the distribution parameter) - Remove dead Bintray repository reference (shutdown May 1, 2021) Note: Maintainers will need to generate new Central Publisher User Tokens at central.sonatype.com and update the ossrh_login/ossrh_pass GitHub secrets. Closes ocadotechnology#17 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The PR build workflow (maven.yml) was also using actions/setup-java@v1 with the 'distribution' parameter, but v1 doesn't support that parameter. Update to v4 for consistency with maven-release.yml. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
98d48f2 to
dbe34b5
Compare
Author
|
Note on JDK version: The CI workflows were using JDK 17 but pom.xml specifies |
Collaborator
|
Thanks, I'll make sure to include these as well. Sorry for the delay, it's taken me a while to track down access to maven central, and other work/life happened as well. I'll endeavour to get these pushed soon. |
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.
[This is also in ticket #17]
Closes #17
Context
I want to use
RepeatableRandomand the instant providers in a project of mine, but Ocava is not currently being distributed through Maven Central - forcing me to build it locally. The latest available version on Maven Central is from before the OSSRH sunset.I've asked Claude (LLM) to investigate why the release workflow is failing, and it has analysed the problem as follows.
Problem
The Maven Central release workflow has been failing since OSSRH (OSS Repository Hosting) was sunset on June 30, 2025. The most recent release attempt failed: https://github.com/ocadotechnology/Ocava/actions/runs/19820654038/job/56782041763
Sonatype shut down both
oss.sonatype.organds01.oss.sonatype.orgas part of the OSSRH end-of-life. All publishing must now go through the new Central Portal.LLM Analysis
Finding 1: Sonatype URL mismatch (pre-sunset)
Even before the sunset, there was an inconsistency in
pom.xml:nexus-staging-maven-pluginwas configured to usehttps://oss.sonatype.org/(the old legacy URL)distributionManagementwas configured to usehttps://s01.oss.sonatype.org/(the newer URL)This mismatch suggests a partial migration was attempted at some point but never completed.
Finding 2: OSSRH is dead
As of June 30, 2025, both URLs are now defunct. Sonatype has migrated all projects to the new Central Portal at https://central.sonatype.com.
The fix requires:
https://ossrh-staging-api.central.sonatype.com/)401 Unauthorized)Finding 3: Outdated GitHub Actions
In
.github/workflows/maven-release.yml, the workflow usesactions/setup-java@v1with adistributionparameter:The
distributionparameter was only added in v2 of this action. With v1, this parameter is silently ignored, causing unpredictable JDK selection.Finding 4: Dead Bintray repository causing confusing errors
The
pom.xmlcontains a repository reference to Bintray:Bintray was shut down on May 1, 2021. This causes Maven to attempt resolution from a dead URL, producing confusing errors like:
This error is misleading - the BOM isn't on Bintray and never was, but Maven tries there anyway before failing.
References consulted
Solution
I've prepared a PR with the code changes:
actions/checkoutandactions/setup-javato v4nexus-staging-maven-pluginURL tohttps://ossrh-staging-api.central.sonatype.com/distributionManagementURLs to the new endpointsHowever, the maintainers will need to:
ossrh_login,ossrh_pass) with the new tokensHappy to help further if needed.