Skip to content

Commit 6e3dcf3

Browse files
committed
Migrate Maven Central publishing to Sonatype Central Portal
Replace deprecated nexus-staging-maven-plugin (oss.sonatype.org) with central-publishing-maven-plugin (central.sonatype.com). Update distributionManagement and workflow server-id accordingly.
1 parent 22d5caf commit 6e3dcf3

2 files changed

Lines changed: 9 additions & 13 deletions

File tree

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
with:
1717
distribution: "temurin"
1818
java-version: "8"
19-
server-id: ossrh
19+
server-id: central
2020
server-username: OSSRH_USERNAME
2121
server-password: OSSRH_PASSWORD
2222
gpg-private-key: ${{ secrets.OSSRH_GPG_PRIVATE_KEY }}

pom.xml

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,9 @@
2222

2323
<distributionManagement>
2424
<snapshotRepository>
25-
<id>ossrh</id>
26-
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
25+
<id>central</id>
26+
<url>https://central.sonatype.com/repository/maven-snapshots/</url>
2727
</snapshotRepository>
28-
<repository>
29-
<id>ossrh</id>
30-
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url>
31-
</repository>
3228
</distributionManagement>
3329

3430
<prerequisites>
@@ -483,14 +479,14 @@
483479
</executions>
484480
</plugin>
485481
<plugin>
486-
<groupId>org.sonatype.plugins</groupId>
487-
<artifactId>nexus-staging-maven-plugin</artifactId>
488-
<version>1.6.8</version>
482+
<groupId>org.sonatype.central</groupId>
483+
<artifactId>central-publishing-maven-plugin</artifactId>
484+
<version>0.7.0</version>
489485
<extensions>true</extensions>
490486
<configuration>
491-
<serverId>ossrh</serverId>
492-
<nexusUrl>https://oss.sonatype.org</nexusUrl>
493-
<autoReleaseAfterClose>true</autoReleaseAfterClose>
487+
<publishingServerId>central</publishingServerId>
488+
<autoPublish>true</autoPublish>
489+
<waitUntil>published</waitUntil>
494490
</configuration>
495491
</plugin>
496492
</plugins>

0 commit comments

Comments
 (0)