Skip to content

Commit 07ca4a4

Browse files
authored
Migrate publish process to Central (#981)
Use new `central-publishing-maven-plugin` plugin to do the publish (recommended by documentation https://central.sonatype.org/publish/publish-portal-maven/)
1 parent 9e603b4 commit 07ca4a4

File tree

2 files changed

+8
-18
lines changed

2 files changed

+8
-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: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -349,31 +349,21 @@
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+
<autoPublish>true</autoPublish>
363+
<waitUntil>published</waitUntil>
374364
</configuration>
375365
</plugin>
376-
</plugins>
366+
</plugins>
377367
</build>
378368
</profile>
379369
</profiles>

0 commit comments

Comments
 (0)