Skip to content

Commit 220bc06

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 <[email protected]>
1 parent db63c37 commit 220bc06

File tree

2 files changed

+14
-79
lines changed

2 files changed

+14
-79
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 & 75 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>
@@ -1094,70 +1093,6 @@
10941093
</build>
10951094
</profile>
10961095

1097-
<profile>
1098-
<id>toolchain</id>
1099-
<activation>
1100-
<property>
1101-
<name>!toolchain.skip</name>
1102-
</property>
1103-
</activation>
1104-
1105-
<build>
1106-
<plugins>
1107-
<plugin>
1108-
<groupId>org.apache.maven.plugins</groupId>
1109-
<artifactId>maven-toolchains-plugin</artifactId>
1110-
<version>3.2.0</version>
1111-
<executions>
1112-
<execution>
1113-
<goals>
1114-
<goal>toolchain</goal>
1115-
</goals>
1116-
<configuration>
1117-
<toolchains>
1118-
<jdk>
1119-
<version>${main.java.version}</version>
1120-
</jdk>
1121-
</toolchains>
1122-
</configuration>
1123-
</execution>
1124-
<execution>
1125-
<id>test</id>
1126-
<goals>
1127-
<goal>toolchain</goal>
1128-
</goals>
1129-
<phase>generate-test-sources</phase>
1130-
<configuration>
1131-
<toolchains>
1132-
<jdk>
1133-
<version>${latest.java.version}</version>
1134-
</jdk>
1135-
</toolchains>
1136-
</configuration>
1137-
</execution>
1138-
</executions>
1139-
</plugin>
1140-
<plugin>
1141-
<groupId>org.apache.maven.plugins</groupId>
1142-
<artifactId>maven-surefire-plugin</artifactId>
1143-
<configuration>
1144-
<jdkToolchain>
1145-
<version>${latest.java.version}</version>
1146-
</jdkToolchain>
1147-
</configuration>
1148-
</plugin>
1149-
<plugin>
1150-
<groupId>org.apache.maven.plugins</groupId>
1151-
<artifactId>maven-failsafe-plugin</artifactId>
1152-
<configuration>
1153-
<jdkToolchain>
1154-
<version>${latest.java.version}</version>
1155-
</jdkToolchain>
1156-
</configuration>
1157-
</plugin>
1158-
</plugins>
1159-
</build>
1160-
</profile>
11611096
</profiles>
11621097

11631098
</project>

0 commit comments

Comments
 (0)