ci: #17 (github) Maven Central releases broken - OSSRH sunset migrati…#18
ci: #17 (github) Maven Central releases broken - OSSRH sunset migrati…#18tim-brown wants to merge 2 commits into
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
|
Note on JDK version: The CI workflows were using JDK 17 but pom.xml specifies |
|
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. |
|
I think this is now working again. v 17.40.46 seems to have published successfully. Thanks for your input on this. |
|
Fixed as part of release https://github.com/ocadotechnology/Ocava/releases/tag/17.40.46 |
[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.