Skip to content

Commit 54592fd

Browse files
veloclaude
andcommitted
Migrate from OSSRH to Sonatype Central Portal
Update Maven publishing configuration to use Central Portal APIs ahead of OSSRH sunset on June 30, 2025: - Replace nexus-staging-maven-plugin with central-publishing-maven-plugin - Update distribution management URLs to use Central Portal endpoints - Update CI settings.xml to use new Central Portal authentication This migration ensures continued publishing capability after OSSRH EOL. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent a99d56a commit 54592fd

File tree

2 files changed

+14
-15
lines changed

2 files changed

+14
-15
lines changed

.circleci/settings.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@
1919
http://maven.apache.org/xsd/settings-1.0.0.xsd">
2020
<servers>
2121
<server>
22-
<id>ossrh</id>
23-
<username>${env.SONATYPE_USER}</username>
24-
<password>${env.SONATYPE_PASSWORD}</password>
22+
<id>central</id>
23+
<username>${env.CENTRAL_TOKEN_USERNAME}</username>
24+
<password>${env.CENTRAL_TOKEN_PASSWORD}</password>
2525
</server>
2626
</servers>
2727
<profiles>
2828
<profile>
29-
<id>ossrh</id>
29+
<id>central</id>
3030
<activation>
3131
<activeByDefault>true</activeByDefault>
3232
</activation>

pom.xml

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -77,12 +77,12 @@
7777

7878
<distributionManagement>
7979
<repository>
80-
<id>ossrh</id>
81-
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
80+
<id>central</id>
81+
<url>https://central.sonatype.com/api/v1/publisher/deployments/upload/</url>
8282
</repository>
8383
<snapshotRepository>
84-
<id>ossrh</id>
85-
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
84+
<id>central</id>
85+
<url>https://central.sonatype.com/api/v1/publisher/deployments/upload/</url>
8686
</snapshotRepository>
8787
</distributionManagement>
8888

@@ -802,15 +802,14 @@
802802
<build>
803803
<plugins>
804804
<plugin>
805-
<groupId>org.sonatype.plugins</groupId>
806-
<artifactId>nexus-staging-maven-plugin</artifactId>
807-
<version>1.7.0</version>
805+
<groupId>org.sonatype.central</groupId>
806+
<artifactId>central-publishing-maven-plugin</artifactId>
807+
<version>0.8.0</version>
808808
<extensions>true</extensions>
809809
<configuration>
810-
<serverId>ossrh</serverId>
811-
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
812-
<autoReleaseAfterClose>true</autoReleaseAfterClose>
813-
<stagingProgressTimeoutMinutes>15</stagingProgressTimeoutMinutes>
810+
<publishingServerId>central</publishingServerId>
811+
<autoPublish>true</autoPublish>
812+
<waitUntil>published</waitUntil>
814813
</configuration>
815814
</plugin>
816815
</plugins>

0 commit comments

Comments
 (0)