Skip to content

Commit 23970f5

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

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
@@ -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: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -349,31 +349,23 @@
349349
<properties>
350350
</properties>
351351
<distributionManagement>
352-
<repository>
353-
<id>ossrh</id>
354-
<name>Maven Central</name>
355-
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
356-
</repository>
357-
<snapshotRepository>
358-
<id>ossrh</id>
359-
<name>Maven Central - Snapshots Repository</name>
360-
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
361-
</snapshotRepository>
362352
</distributionManagement>
363353
<build>
364354
<plugins>
365355
<plugin>
366-
<groupId>org.sonatype.plugins</groupId>
367-
<artifactId>nexus-staging-maven-plugin</artifactId>
368-
<version>1.6.13</version>
356+
<groupId>org.sonatype.central</groupId>
357+
<artifactId>central-publishing-maven-plugin</artifactId>
358+
<version>0.8.0</version>
369359
<extensions>true</extensions>
370360
<configuration>
371-
<serverId>ossrh</serverId>
372-
<nexusUrl>https://s01.oss.sonatype.org</nexusUrl>
373-
<autoReleaseAfterClose>true</autoReleaseAfterClose>
361+
<publishingServerId>central</publishingServerId>
362+
<!--
363+
<autoPublish>true</autoPublish>
364+
<waitUntil>published</waitUntil>
365+
-->
374366
</configuration>
375367
</plugin>
376-
</plugins>
368+
</plugins>
377369
</build>
378370
</profile>
379371
</profiles>

0 commit comments

Comments
 (0)