Skip to content

Commit 7e0889d

Browse files
anaibertairoqueta
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 7b86853 commit 7e0889d

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
@@ -341,31 +341,21 @@
341341
<properties>
342342
</properties>
343343
<distributionManagement>
344-
<repository>
345-
<id>ossrh</id>
346-
<name>Maven Central</name>
347-
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
348-
</repository>
349-
<snapshotRepository>
350-
<id>ossrh</id>
351-
<name>Maven Central - Snapshots Repository</name>
352-
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
353-
</snapshotRepository>
354344
</distributionManagement>
355345
<build>
356346
<plugins>
357347
<plugin>
358-
<groupId>org.sonatype.plugins</groupId>
359-
<artifactId>nexus-staging-maven-plugin</artifactId>
360-
<version>1.6.13</version>
348+
<groupId>org.sonatype.central</groupId>
349+
<artifactId>central-publishing-maven-plugin</artifactId>
350+
<version>0.8.0</version>
361351
<extensions>true</extensions>
362352
<configuration>
363-
<serverId>ossrh</serverId>
364-
<nexusUrl>https://s01.oss.sonatype.org</nexusUrl>
365-
<autoReleaseAfterClose>true</autoReleaseAfterClose>
353+
<publishingServerId>central</publishingServerId>
354+
<autoPublish>true</autoPublish>
355+
<waitUntil>published</waitUntil>
366356
</configuration>
367357
</plugin>
368-
</plugins>
358+
</plugins>
369359
</build>
370360
</profile>
371361
</profiles>

0 commit comments

Comments
 (0)