Skip to content
This repository was archived by the owner on Apr 27, 2026. It is now read-only.

Commit 7c20705

Browse files
honnixclaude
andcommitted
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 <honnix@gmail.com> Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Hongxin Liang <honnix@users.noreply.github.com>
1 parent 9bfdc21 commit 7c20705

4 files changed

Lines changed: 18 additions & 48 deletions

File tree

.github/workflows/build.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
with:
2323
java-version: 11.0
2424
distribution: 'adopt'
25-
server-id: ossrh
25+
server-id: central
2626
server-username: MAVEN_USERNAME
2727
server-password: MAVEN_PASSWORD
2828
gpg-private-key: ${{ secrets.SONATYPE_GPG_PRIVATE_KEY }}

.github/workflows/release.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
with:
3131
java-version: 11.0
3232
distribution: 'adopt'
33-
server-id: ossrh
33+
server-id: central
3434
server-username: MAVEN_USERNAME
3535
server-password: MAVEN_PASSWORD
3636
gpg-private-key: ${{ secrets.SONATYPE_GPG_PRIVATE_KEY }}

flytekit-bom/pom.xml

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,9 @@
5353
</scm>
5454

5555
<distributionManagement>
56-
<repository>
57-
<id>ossrh</id>
58-
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
59-
</repository>
6056
<snapshotRepository>
61-
<id>ossrh</id>
62-
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
57+
<id>central</id>
58+
<url>https://central.sonatype.com/repository/maven-snapshots/</url>
6359
</snapshotRepository>
6460
</distributionManagement>
6561

@@ -286,14 +282,14 @@
286282
</executions>
287283
</plugin>
288284
<plugin>
289-
<groupId>org.sonatype.plugins</groupId>
290-
<artifactId>nexus-staging-maven-plugin</artifactId>
291-
<version>1.6.8</version>
285+
<groupId>org.sonatype.central</groupId>
286+
<artifactId>central-publishing-maven-plugin</artifactId>
287+
<version>0.10.0</version>
292288
<extensions>true</extensions>
293289
<configuration>
294-
<serverId>ossrh</serverId>
295-
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
296-
<autoReleaseAfterClose>true</autoReleaseAfterClose>
290+
<publishingServerId>central</publishingServerId>
291+
<autoPublish>true</autoPublish>
292+
<waitUntil>published</waitUntil>
297293
</configuration>
298294
</plugin>
299295
</plugins>

pom.xml

Lines changed: 8 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -74,13 +74,9 @@
7474
</scm>
7575

7676
<distributionManagement>
77-
<repository>
78-
<id>ossrh</id>
79-
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
80-
</repository>
8177
<snapshotRepository>
82-
<id>ossrh</id>
83-
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
78+
<id>central</id>
79+
<url>https://central.sonatype.com/repository/maven-snapshots/</url>
8480
</snapshotRepository>
8581
</distributionManagement>
8682

@@ -411,28 +407,6 @@
411407
</dependencies>
412408
</dependencyManagement>
413409

414-
<repositories>
415-
<repository>
416-
<releases>
417-
<enabled>false</enabled>
418-
</releases>
419-
<snapshots>
420-
<enabled>true</enabled>
421-
</snapshots>
422-
<id>apache.snapshots</id>
423-
<name>Apache Development Snapshot Repository</name>
424-
<url>https://repository.apache.org/content/repositories/snapshots/</url>
425-
</repository>
426-
<repository>
427-
<snapshots>
428-
<enabled>false</enabled>
429-
</snapshots>
430-
<id>ossrh</id>
431-
<name>Sonatype OSS</name>
432-
<url>https://oss.sonatype.org/content/repositories/releases/</url>
433-
</repository>
434-
</repositories>
435-
436410
<build>
437411
<pluginManagement>
438412
<plugins>
@@ -862,14 +836,14 @@
862836
</executions>
863837
</plugin>
864838
<plugin>
865-
<groupId>org.sonatype.plugins</groupId>
866-
<artifactId>nexus-staging-maven-plugin</artifactId>
867-
<version>1.6.8</version>
839+
<groupId>org.sonatype.central</groupId>
840+
<artifactId>central-publishing-maven-plugin</artifactId>
841+
<version>0.10.0</version>
868842
<extensions>true</extensions>
869843
<configuration>
870-
<serverId>ossrh</serverId>
871-
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
872-
<autoReleaseAfterClose>true</autoReleaseAfterClose>
844+
<publishingServerId>central</publishingServerId>
845+
<autoPublish>true</autoPublish>
846+
<waitUntil>published</waitUntil>
873847
</configuration>
874848
</plugin>
875849
</plugins>

0 commit comments

Comments
 (0)