From 7c20705717669cc173bac25efaea9d9c9cb7baa6 Mon Sep 17 00:00:00 2001 From: Hongxin Liang Date: Tue, 24 Mar 2026 17:08:23 +0100 Subject: [PATCH] chore: migrate from OSSRH to Sonatype Central Portal Sonatype legacy OSSRH (s01.oss.sonatype.org) has been shut down, causing 405 errors on snapshot deploys. Migrate to Central Portal: - Replace nexus-staging-maven-plugin with central-publishing-maven-plugin - Update distributionManagement to use Central Portal snapshot URL - Update CI workflows to use server-id "central" - Remove obsolete OSSRH releases repository Note: repo secrets (SONATYPE_USERNAME/PASSWORD) must be replaced with new Central Portal tokens generated at https://central.sonatype.com. Snapshots must also be enabled for the namespace in the Portal UI. Signed-off-by: Hongxin Liang Co-Authored-By: Claude Opus 4.6 (1M context) Signed-off-by: Hongxin Liang --- .github/workflows/build.yaml | 2 +- .github/workflows/release.yaml | 2 +- flytekit-bom/pom.xml | 20 +++++++--------- pom.xml | 42 +++++++--------------------------- 4 files changed, 18 insertions(+), 48 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 22be593f..865c4d17 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -22,7 +22,7 @@ jobs: with: java-version: 11.0 distribution: 'adopt' - server-id: ossrh + server-id: central server-username: MAVEN_USERNAME server-password: MAVEN_PASSWORD gpg-private-key: ${{ secrets.SONATYPE_GPG_PRIVATE_KEY }} diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 0559a6a5..cd653463 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -30,7 +30,7 @@ jobs: with: java-version: 11.0 distribution: 'adopt' - server-id: ossrh + server-id: central server-username: MAVEN_USERNAME server-password: MAVEN_PASSWORD gpg-private-key: ${{ secrets.SONATYPE_GPG_PRIVATE_KEY }} diff --git a/flytekit-bom/pom.xml b/flytekit-bom/pom.xml index 83893f6e..f4dbe8d1 100644 --- a/flytekit-bom/pom.xml +++ b/flytekit-bom/pom.xml @@ -53,13 +53,9 @@ - - ossrh - https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/ - - ossrh - https://s01.oss.sonatype.org/content/repositories/snapshots + central + https://central.sonatype.com/repository/maven-snapshots/ @@ -286,14 +282,14 @@ - org.sonatype.plugins - nexus-staging-maven-plugin - 1.6.8 + org.sonatype.central + central-publishing-maven-plugin + 0.10.0 true - ossrh - https://s01.oss.sonatype.org/ - true + central + true + published diff --git a/pom.xml b/pom.xml index 571390d4..1c18f6e1 100644 --- a/pom.xml +++ b/pom.xml @@ -74,13 +74,9 @@ - - ossrh - https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/ - - ossrh - https://s01.oss.sonatype.org/content/repositories/snapshots + central + https://central.sonatype.com/repository/maven-snapshots/ @@ -411,28 +407,6 @@ - - - - false - - - true - - apache.snapshots - Apache Development Snapshot Repository - https://repository.apache.org/content/repositories/snapshots/ - - - - false - - ossrh - Sonatype OSS - https://oss.sonatype.org/content/repositories/releases/ - - - @@ -862,14 +836,14 @@ - org.sonatype.plugins - nexus-staging-maven-plugin - 1.6.8 + org.sonatype.central + central-publishing-maven-plugin + 0.10.0 true - ossrh - https://s01.oss.sonatype.org/ - true + central + true + published