Skip to content

chore: migrate Maven deployment from OSSRH to Maven Central Portal#1327

Merged
bpauli merged 2 commits into
developfrom
fix/sonatype-central-migration
May 8, 2026
Merged

chore: migrate Maven deployment from OSSRH to Maven Central Portal#1327
bpauli merged 2 commits into
developfrom
fix/sonatype-central-migration

Conversation

@bpauli
Copy link
Copy Markdown
Contributor

@bpauli bpauli commented May 8, 2026

Summary

  • Replace org.sonatype.plugins:nexus-staging-maven-plugin:1.6.7 with org.sonatype.central:central-publishing-maven-plugin:0.8.0 in the release profile.
  • Switch the .github/workflows/settings.xml profile and server id from ossrh to central and point at https://central.sonatype.com/repository/maven-{releases,snapshots}/.
  • Rename the credential env vars from SONATYPE_USERNAME/SONATYPE_PASSWORD to MAVEN_CENTRAL_USERNAME/MAVEN_CENTRAL_PASSWORD in maven-release.yml and settings.xml, and switch the active Maven profile from ossrh to central.

OSSRH (oss.sonatype.org) is decommissioned per https://central.sonatype.org/pages/ossrh-eol/; this mirrors the migration applied in adobe/aem-core-wcm-components#2977.

The Release workflow on release/57 has been failing with 401 Unauthorized against https://oss.sonatype.org/ (run). A parallel cherry-pick of this commit has been opened against release/57 to unblock the v57 release.

Important

Requires the org-level secrets MAVEN_CENTRAL_USERNAME and MAVEN_CENTRAL_PASSWORD to be populated with valid Central Portal user-tokens for the com.adobe.aem namespace before this can publish successfully.

Test plan

  • Confirm MAVEN_CENTRAL_USERNAME / MAVEN_CENTRAL_PASSWORD org secrets exist (with OSPO)
  • Trigger the Release workflow on release/57 (after the companion PR is merged) and verify deploy to central.sonatype.com succeeds

bpauli added 2 commits May 8, 2026 11:59
OSSRH (oss.sonatype.org) is decommissioned per
https://central.sonatype.org/pages/ossrh-eol/. Replace
nexus-staging-maven-plugin with central-publishing-maven-plugin and
switch the release workflow to use the central Sonatype Portal endpoints
and MAVEN_CENTRAL_USERNAME/MAVEN_CENTRAL_PASSWORD credentials.
The org-level secrets MAVEN_CENTRAL_USERNAME/MAVEN_CENTRAL_PASSWORD
do not exist; reuse the existing SONATYPE_USERNAME/SONATYPE_PASSWORD
secrets which carry over the Central Portal user-token after the
Sonatype OSSRH -> Central Portal migration. The Maven server id stays
'central' to match publishingServerId in pom.xml.
@bpauli
Copy link
Copy Markdown
Contributor Author

bpauli commented May 8, 2026

Updated to reuse the existing org-level SONATYPE_USERNAME/SONATYPE_PASSWORD secrets — verified that MAVEN_CENTRAL_USERNAME/MAVEN_CENTRAL_PASSWORD are not configured at repo or org level. The secret name is just a label; the value behind SONATYPE_PASSWORD is a Central Portal user-token (Sonatype carried these over from OSSRH automatically). Maven server id stays central to match publishingServerId in pom.xml.

Warning

Per the open-source guild Slack thread, the com.adobe.aem namespace was removed from the org's Central Portal account during the OSSRH migration and OSPO is still working on re-attaching it. Even with valid credentials this will 401 until that's done — confirm with @bscott before triggering the v58 release.

@bpauli bpauli merged commit 1df0555 into develop May 8, 2026
17 checks passed
@bpauli bpauli deleted the fix/sonatype-central-migration branch May 8, 2026 10:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant