Skip to content

Commit 2970ed8

Browse files
committed
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 ddbdfd5 commit 2970ed8

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
@@ -49,7 +49,7 @@ jobs:
4949
servers: '[
5050
{ "id": "github-genexuslabs", "username": "genexusbot", "password": "${{ secrets.SECURE_TOKEN }}" },
5151
{ "id": "azure-devops", "username": "genexuslabs", "password": "${env.AZURE_ARTIFACTS_TOKEN}" },
52-
{ "id": "ossrh", "username": "${env.MAVEN_USERNAME}", "password": "${env.MAVEN_PASSWORD}" },
52+
{ "id": "central", "username": "${env.MAVEN_USERNAME}", "password": "${env.MAVEN_PASSWORD}" },
5353
{ "id": "gpg.passphrase", "passphrase": "${env.MAVEN_GPG_PASSPHRASE}" }
5454
]'
5555

pom.xml

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -307,31 +307,21 @@
307307
<properties>
308308
</properties>
309309
<distributionManagement>
310-
<repository>
311-
<id>ossrh</id>
312-
<name>Maven Central</name>
313-
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
314-
</repository>
315-
<snapshotRepository>
316-
<id>ossrh</id>
317-
<name>Maven Central - Snapshots Repository</name>
318-
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
319-
</snapshotRepository>
320310
</distributionManagement>
321311
<build>
322312
<plugins>
323313
<plugin>
324-
<groupId>org.sonatype.plugins</groupId>
325-
<artifactId>nexus-staging-maven-plugin</artifactId>
326-
<version>1.6.7</version>
314+
<groupId>org.sonatype.central</groupId>
315+
<artifactId>central-publishing-maven-plugin</artifactId>
316+
<version>0.8.0</version>
327317
<extensions>true</extensions>
328318
<configuration>
329-
<serverId>ossrh</serverId>
330-
<nexusUrl>https://s01.oss.sonatype.org</nexusUrl>
331-
<autoReleaseAfterClose>true</autoReleaseAfterClose>
319+
<publishingServerId>central</publishingServerId>
320+
<autoPublish>true</autoPublish>
321+
<waitUntil>published</waitUntil>
332322
</configuration>
333323
</plugin>
334-
</plugins>
324+
</plugins>
335325
</build>
336326
</profile>
337327
</profiles>

0 commit comments

Comments
 (0)