Skip to content

Commit 4da1d77

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 bce0ab1 commit 4da1d77

File tree

2 files changed

+9
-17
lines changed

2 files changed

+9
-17
lines changed

.github/workflows/Build.yml

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

pom.xml

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -355,28 +355,20 @@
355355
<properties>
356356
</properties>
357357
<distributionManagement>
358-
<repository>
359-
<id>ossrh</id>
360-
<name>Maven Central</name>
361-
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
362-
</repository>
363-
<snapshotRepository>
364-
<id>ossrh</id>
365-
<name>Maven Central - Snapshots Repository</name>
366-
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
367-
</snapshotRepository>
368358
</distributionManagement>
369359
<build>
370360
<plugins>
371361
<plugin>
372-
<groupId>org.sonatype.plugins</groupId>
373-
<artifactId>nexus-staging-maven-plugin</artifactId>
374-
<version>1.6.13</version>
362+
<groupId>org.sonatype.central</groupId>
363+
<artifactId>central-publishing-maven-plugin</artifactId>
364+
<version>0.8.0</version>
375365
<extensions>true</extensions>
376366
<configuration>
377-
<serverId>ossrh</serverId>
378-
<nexusUrl>https://s01.oss.sonatype.org</nexusUrl>
379-
<autoReleaseAfterClose>true</autoReleaseAfterClose>
367+
<publishingServerId>central</publishingServerId>
368+
<!--
369+
<autoPublish>true</autoPublish>
370+
<waitUntil>published</waitUntil>
371+
-->
380372
</configuration>
381373
</plugin>
382374
</plugins>

0 commit comments

Comments
 (0)