Skip to content

Commit 34c5847

Browse files
anaibertafpanizza
authored andcommitted
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/) (cherry picked from commit 07ca4a4)
1 parent a276d97 commit 34c5847

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
@@ -348,31 +348,21 @@
348348
<properties>
349349
</properties>
350350
<distributionManagement>
351-
<repository>
352-
<id>ossrh</id>
353-
<name>Maven Central</name>
354-
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
355-
</repository>
356-
<snapshotRepository>
357-
<id>ossrh</id>
358-
<name>Maven Central - Snapshots Repository</name>
359-
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
360-
</snapshotRepository>
361351
</distributionManagement>
362352
<build>
363353
<plugins>
364354
<plugin>
365-
<groupId>org.sonatype.plugins</groupId>
366-
<artifactId>nexus-staging-maven-plugin</artifactId>
367-
<version>1.6.13</version>
355+
<groupId>org.sonatype.central</groupId>
356+
<artifactId>central-publishing-maven-plugin</artifactId>
357+
<version>0.8.0</version>
368358
<extensions>true</extensions>
369359
<configuration>
370-
<serverId>ossrh</serverId>
371-
<nexusUrl>https://s01.oss.sonatype.org</nexusUrl>
372-
<autoReleaseAfterClose>true</autoReleaseAfterClose>
360+
<publishingServerId>central</publishingServerId>
361+
<autoPublish>true</autoPublish>
362+
<waitUntil>published</waitUntil>
373363
</configuration>
374364
</plugin>
375-
</plugins>
365+
</plugins>
376366
</build>
377367
</profile>
378368
</profiles>

0 commit comments

Comments
 (0)