Skip to content

Commit 29327ed

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 <[email protected]> Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]> Signed-off-by: Hongxin Liang <[email protected]>
1 parent 9bfdc21 commit 29327ed

File tree

4 files changed

+18
-34
lines changed

4 files changed

+18
-34
lines changed

.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 & 20 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

@@ -423,14 +419,6 @@
423419
<name>Apache Development Snapshot Repository</name>
424420
<url>https://repository.apache.org/content/repositories/snapshots/</url>
425421
</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>
434422
</repositories>
435423

436424
<build>
@@ -862,14 +850,14 @@
862850
</executions>
863851
</plugin>
864852
<plugin>
865-
<groupId>org.sonatype.plugins</groupId>
866-
<artifactId>nexus-staging-maven-plugin</artifactId>
867-
<version>1.6.8</version>
853+
<groupId>org.sonatype.central</groupId>
854+
<artifactId>central-publishing-maven-plugin</artifactId>
855+
<version>0.10.0</version>
868856
<extensions>true</extensions>
869857
<configuration>
870-
<serverId>ossrh</serverId>
871-
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
872-
<autoReleaseAfterClose>true</autoReleaseAfterClose>
858+
<publishingServerId>central</publishingServerId>
859+
<autoPublish>true</autoPublish>
860+
<waitUntil>published</waitUntil>
873861
</configuration>
874862
</plugin>
875863
</plugins>

0 commit comments

Comments
 (0)