Skip to content

Commit 8f5c93e

Browse files
committed
Update publish process to Central
* Use new `central-publishing-maven-plugin` plugin (documentation https://central.sonatype.org/publish/publish-portal-maven/) (cherry picked from commit 23970f5)
1 parent 4c5099e commit 8f5c93e

File tree

2 files changed

+10
-18
lines changed

2 files changed

+10
-18
lines changed

.github/workflows/Build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454
servers: '[
5555
{ "id": "github-genexuslabs", "username": "genexusbot", "password": "${{ secrets.SECURE_TOKEN }}" },
5656
{ "id": "azure-devops", "username": "genexuslabs", "password": "${env.AZURE_ARTIFACTS_TOKEN}" },
57-
{ "id": "ossrh", "username": "${env.MAVEN_USERNAME}", "password": "${env.MAVEN_PASSWORD}" },
57+
{ "id": "central", "username": "${env.MAVEN_USERNAME}", "password": "${env.MAVEN_PASSWORD}" },
5858
{ "id": "gpg.passphrase", "passphrase": "${env.MAVEN_GPG_PASSPHRASE}" }
5959
]'
6060

pom.xml

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -337,31 +337,23 @@
337337
<properties>
338338
</properties>
339339
<distributionManagement>
340-
<repository>
341-
<id>ossrh</id>
342-
<name>Maven Central</name>
343-
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
344-
</repository>
345-
<snapshotRepository>
346-
<id>ossrh</id>
347-
<name>Maven Central - Snapshots Repository</name>
348-
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
349-
</snapshotRepository>
350340
</distributionManagement>
351341
<build>
352342
<plugins>
353343
<plugin>
354-
<groupId>org.sonatype.plugins</groupId>
355-
<artifactId>nexus-staging-maven-plugin</artifactId>
356-
<version>1.6.7</version>
344+
<groupId>org.sonatype.central</groupId>
345+
<artifactId>central-publishing-maven-plugin</artifactId>
346+
<version>0.8.0</version>
357347
<extensions>true</extensions>
358348
<configuration>
359-
<serverId>ossrh</serverId>
360-
<nexusUrl>https://s01.oss.sonatype.org</nexusUrl>
361-
<autoReleaseAfterClose>true</autoReleaseAfterClose>
349+
<publishingServerId>central</publishingServerId>
350+
<!--
351+
<autoPublish>true</autoPublish>
352+
<waitUntil>published</waitUntil>
353+
-->
362354
</configuration>
363355
</plugin>
364-
</plugins>
356+
</plugins>
365357
</build>
366358
</profile>
367359
</profiles>

0 commit comments

Comments
 (0)