Skip to content

Commit 580ec4b

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) (cherry picked from commit 34c5847)
1 parent 30f99d3 commit 580ec4b

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
@@ -344,31 +344,21 @@
344344
<properties>
345345
</properties>
346346
<distributionManagement>
347-
<repository>
348-
<id>ossrh</id>
349-
<name>Maven Central</name>
350-
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
351-
</repository>
352-
<snapshotRepository>
353-
<id>ossrh</id>
354-
<name>Maven Central - Snapshots Repository</name>
355-
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
356-
</snapshotRepository>
357347
</distributionManagement>
358348
<build>
359349
<plugins>
360350
<plugin>
361-
<groupId>org.sonatype.plugins</groupId>
362-
<artifactId>nexus-staging-maven-plugin</artifactId>
363-
<version>1.6.13</version>
351+
<groupId>org.sonatype.central</groupId>
352+
<artifactId>central-publishing-maven-plugin</artifactId>
353+
<version>0.8.0</version>
364354
<extensions>true</extensions>
365355
<configuration>
366-
<serverId>ossrh</serverId>
367-
<nexusUrl>https://s01.oss.sonatype.org</nexusUrl>
368-
<autoReleaseAfterClose>true</autoReleaseAfterClose>
356+
<publishingServerId>central</publishingServerId>
357+
<autoPublish>true</autoPublish>
358+
<waitUntil>published</waitUntil>
369359
</configuration>
370360
</plugin>
371-
</plugins>
361+
</plugins>
372362
</build>
373363
</profile>
374364
</profiles>

0 commit comments

Comments
 (0)