Repository navigation
Fix Maven Central publishing after OSSRH sunset - #8
Merged
Merged
Conversation
- Point nexusPublishing at the Central Portal OSSRH Staging API compatibility service (oss.sonatype.org was shut down on 2025-06-30) - Remove the duplicate direct-deploy OSSRH repository in publish.gradle - Propagate version to all subprojects via allprojects (previously only the root project got it, so artifacts were published as "unspecified") - Read credentials from MAVEN_CENTRAL_USERNAME / MAVEN_CENTRAL_PASSWORD secrets (Central Portal user token) instead of OSSRH_USERNAME / OSSRH_TOKEN - Strip the "v" prefix from release tags, set the version before building, and use publishToSonatype closeAndReleaseSonatypeStagingRepository Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- actions/checkout v3/v4.2.2 -> v7.0.1 - actions/setup-java v3/v4 -> v5.7.0 - actions/github-script v7.0.1 -> v9.0.0 - gradle/wrapper-validation-action (deprecated) -> gradle/actions/wrapper-validation v6.3.0 All actions are now pinned to full commit SHAs with version comments. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Restores full commit SHA pinning (with version comments) for all actions to guard against tag-rewrite supply chain attacks. Co-Authored-By: Claude Fable 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.
Summary
Publishing to Maven Central has never succeeded (no artifacts exist under
com.linecorp.flagship4jon Central). This PR fixes the three root causes:oss.sonatype.orgwas permanently shut down on 2025-06-30. Both publishing endpoints in this repo still pointed to it. NownexusPublishingtargets the Central Portal OSSRH Staging API compatibility service (ossrh-staging-api.central.sonatype.com), with snapshots going tocentral.sonatype.com/repository/maven-snapshots/.unspecified: since Update versioning and publishing configuration #7 movedversionfromgradle.propertiesinto the rootbuild.gradle, only the root project got the version (Gradle does not inheritversion). Wrapped inallprojects { }so published artifacts get the real version.OSSRH_USERNAME/OSSRH_TOKENsecrets — switched to the org-providedMAVEN_CENTRAL_USERNAME/MAVEN_CENTRAL_PASSWORD(Central Portal user token). Also removed the duplicate direct-deploy OSSRH repository ingradle/publish.gradle, and changed the publish command to the plugin-recommendedpublishToSonatype closeAndReleaseSonatypeStagingRepository.Additionally, the release tag's
vprefix is now stripped (vX.Y.Z→X.Y.Z) and the version is set before the build step.Verification
Verified locally with JDK 8 (same as CI) in Docker:
./gradlew assemble— BUILD SUCCESSFULSDK_VERSION=0.1.99: generated POM has correctgroupId/version; subprojects no longer resolve tounspecified--dry-run publishToSonatype closeAndReleaseSonatypeStagingRepository— task graph wires correctly; example modules are excluded from publishingBefore releasing
MAVEN_CENTRAL_USERNAME/MAVEN_CENTRAL_PASSWORDsecrets contain a Central Portal user token (legacy OSSRH tokens get 401 on the new API)GPG_KEY_ID/GPG_PRIVATE_KEY/GPG_PASSWORDsecrets exist (signing is skipped silently if missing, and Central rejects unsigned artifacts)workflow_dispatchwith a test version before the next real release🤖 Generated with Claude Code