Skip to content

Commit 5ef99ef

Browse files
authored
Migrate from OSSRH to Central Publisher Portal (#2962)
* Migrate from OSSRH to Central Publisher Portal - Replace nexus-staging-maven-plugin with central-publishing-maven-plugin - Update distributionManagement URLs to Central Publisher Portal endpoints - Configure auto-publishing with waitUntil=published for immediate release - Update GitHub Actions to use CENTRAL_TOKEN_* environment variables - Update Maven settings.xml server configuration for Central Portal This addresses the OSSRH sunset deadline of June 30th, 2025. Signed-off-by: Marvin Froeder <velo.br@gmail.com> * Build with one thread per core Signed-off-by: Marvin Froeder <velo.br@gmail.com> --------- Signed-off-by: Marvin Froeder <velo.br@gmail.com>
1 parent 7084312 commit 5ef99ef

File tree

7 files changed

+18
-242
lines changed

7 files changed

+18
-242
lines changed

.circleci/config.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ jobs:
147147
name: 'Test'
148148
command: |
149149
source "$HOME/.sdkman/bin/sdkman-init.sh"
150-
./mvnw -ntp -B verify
150+
./mvnw -ntp -B verify -T1C
151151
- verify-formatting
152152

153153
deploy:
@@ -191,7 +191,7 @@ workflows:
191191
name: 'deploy snapshot'
192192
requires:
193193
- 'snapshot'
194-
context: Sonatype
194+
context: central
195195
filters:
196196
<<: *master-only
197197

@@ -205,6 +205,6 @@ workflows:
205205
name: 'release to maven central'
206206
requires:
207207
- 'setup-environment-release'
208-
context: Sonatype
208+
context: central
209209
filters:
210210
<<: *tags-only

.circleci/settings.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@
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>

.github/files/settings.xml

Lines changed: 0 additions & 39 deletions
This file was deleted.

.github/files/toolchains.xml

Lines changed: 0 additions & 53 deletions
This file was deleted.

.github/workflows/auto-merge-dependabot.yml

Lines changed: 0 additions & 28 deletions
This file was deleted.

.github/workflows/codeql-analysis.yml

Lines changed: 0 additions & 105 deletions
This file was deleted.

pom.xml

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -143,12 +143,12 @@
143143

144144
<distributionManagement>
145145
<repository>
146-
<id>ossrh</id>
147-
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
146+
<id>central</id>
147+
<url>https://central.sonatype.com/api/v1/publisher</url>
148148
</repository>
149149
<snapshotRepository>
150-
<id>ossrh</id>
151-
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
150+
<id>central</id>
151+
<url>https://central.sonatype.com/api/v1/publisher</url>
152152
</snapshotRepository>
153153
</distributionManagement>
154154

@@ -194,6 +194,7 @@
194194
<maven-release-plugin.version>3.1.1</maven-release-plugin.version>
195195
<maven-bundle-plugin.version>6.0.0</maven-bundle-plugin.version>
196196
<centralsync-maven-plugin.version>0.1.1</centralsync-maven-plugin.version>
197+
<central-publishing-maven-plugin.version>0.8.0</central-publishing-maven-plugin.version>
197198
<maven-surefire-plugin.version>3.5.2</maven-surefire-plugin.version>
198199
<bom-generator.version>0.200.4</bom-generator.version>
199200
<bom.template.file.path>file://${project.basedir}/src/config/bom.xml</bom.template.file.path>
@@ -876,15 +877,15 @@
876877
</configuration>
877878
</plugin>
878879
<plugin>
879-
<groupId>org.sonatype.plugins</groupId>
880-
<artifactId>nexus-staging-maven-plugin</artifactId>
881-
<version>1.7.0</version>
880+
<groupId>org.sonatype.central</groupId>
881+
<artifactId>central-publishing-maven-plugin</artifactId>
882+
<version>${central-publishing-maven-plugin.version}</version>
882883
<extensions>true</extensions>
883884
<configuration>
884-
<serverId>ossrh</serverId>
885-
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
886-
<autoReleaseAfterClose>true</autoReleaseAfterClose>
887-
<stagingProgressTimeoutMinutes>15</stagingProgressTimeoutMinutes>
885+
<publishingServerId>central</publishingServerId>
886+
<autoPublish>true</autoPublish>
887+
<waitUntil>published</waitUntil>
888+
<checksums>all</checksums>
888889
</configuration>
889890
</plugin>
890891
<plugin>

0 commit comments

Comments
 (0)