Skip to content

Commit e28118a

Browse files
committed
fix(build): migrate to the central publishing plugin
Signed-off-by: Norbert Biczo <[email protected]>
1 parent 582a5e7 commit e28118a

File tree

2 files changed

+11
-16
lines changed

2 files changed

+11
-16
lines changed

.github/workflows/publish.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ jobs:
2929
distribution: 'adopt'
3030
cache: 'maven'
3131
# Configure ~/.m2/settings.xml
32-
server-id: ossrh
33-
server-username: OSSRH_USERNAME
34-
server-password: OSSRH_PASSWORD
32+
server-id: central
33+
server-username: CP_USERNAME
34+
server-password: CP_PASSWORD
3535
# Import GPG key into build agent's local keystore
3636
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
3737
gpg-passphrase: ${{ secrets.GPG_PASSPHRASE }}

pom.xml

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
<rx-version>2.2.21</rx-version>
3333
<mockito-version>5.18.0</mockito-version>
3434
<maven-deploy-plugin-version>3.1.1</maven-deploy-plugin-version>
35-
<nexus-staging-plugin-version>1.6.13</nexus-staging-plugin-version>
35+
<central-publish-plugin-version>0.8.0</central-publish-plugin-version>
3636
<maven-gpg-plugin-version>3.1.0</maven-gpg-plugin-version>
3737

3838
<maven-enforcer-version>3.4.1</maven-enforcer-version>
@@ -356,26 +356,21 @@
356356
<!-- We don't deploy snapshot releases -->
357357
</snapshotRepository>
358358
<repository>
359-
<!-- This is where the nexus staging plugin will publish
360-
artifacts -->
361-
<id>ossrh</id>
362-
<url>
363-
https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
359+
<id>central</id>
360+
<url>https://central.sonatype.com/repository/maven-snapshots/</url>
364361
</repository>
365362
</distributionManagement>
366363

367364
<build>
368365
<plugins>
369366
<plugin>
370-
<groupId>org.sonatype.plugins</groupId>
371-
<artifactId>nexus-staging-maven-plugin</artifactId>
372-
<version>${nexus-staging-plugin-version}</version>
367+
<groupId>org.sonatype.central</groupId>
368+
<artifactId>central-publishing-maven-plugin</artifactId>
369+
<version>${central-publish-plugin-version}</version>
373370
<extensions>true</extensions>
374371
<configuration>
375-
<serverId>ossrh</serverId>
376-
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
377-
<autoReleaseAfterClose>true</autoReleaseAfterClose>
378-
<keepStagingRepositoryOnCloseRuleFailure>true</keepStagingRepositoryOnCloseRuleFailure>
372+
<publishingServerId>central</publishingServerId>
373+
<autoPublish>true</autoPublish>
379374
</configuration>
380375
</plugin>
381376
<plugin>

0 commit comments

Comments
 (0)