Skip to content

Commit 08b923f

Browse files
committed
Migrate OSSRH to Central Portal
1 parent 2b2ee80 commit 08b923f

File tree

4 files changed

+23
-36
lines changed

4 files changed

+23
-36
lines changed

.github/workflows/java8-maven.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,8 @@ jobs:
9595
- name: Deploy snapshot with Maven if settings defined
9696
run: test ! -f ci.settings.xml || mvn deploy -DskipTests -s ci.settings.xml -P base-deploy,snapshot-deploy,!non-deployable-modules
9797
env:
98-
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
99-
OSSRH_TOKEN: ${{ secrets.OSSRH_TOKEN }}
98+
CENTRAL_PORTAL_USERNAME: ${{ secrets.CENTRAL_PORTAL_USERNAME }}
99+
CENTRAL_PORTAL_TOKEN: ${{ secrets.CENTRAL_PORTAL_TOKEN }}
100100
SIGN_KEY: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
101101
SIGN_KEY_PASS: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
102102

@@ -145,8 +145,8 @@ jobs:
145145
- name: Deploy with Maven if settings defined
146146
run: test ! -f ci.settings.xml || mvn deploy -DskipTests -s ci.settings.xml -P base-deploy,release-deploy,!non-deployable-modules
147147
env:
148-
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
149-
OSSRH_TOKEN: ${{ secrets.OSSRH_TOKEN }}
148+
CENTRAL_PORTAL_USERNAME: ${{ secrets.CENTRAL_PORTAL_USERNAME }}
149+
CENTRAL_PORTAL_TOKEN: ${{ secrets.CENTRAL_PORTAL_TOKEN }}
150150
SIGN_KEY: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
151151
SIGN_KEY_PASS: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
152152
# Fix https://issues.sonatype.org/browse/OSSRH-66257

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99
### Changed
1010

1111
- Deprecate `@ServiceDefinition#singleton` option to avoid class loading issues
12+
- Migrate OSSRH to Central Portal
1213

1314
## [1.9.0] - 2024-02-06
1415

ci.settings.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
33
<servers>
44
<server>
5-
<id>ossrh</id>
6-
<username>${env.OSSRH_USERNAME}</username>
7-
<password>${env.OSSRH_TOKEN}</password>
5+
<id>central</id>
6+
<username>${env.CENTRAL_PORTAL_USERNAME}</username>
7+
<password>${env.CENTRAL_PORTAL_TOKEN}</password>
88
</server>
99
</servers>
1010
</settings>

pom.xml

Lines changed: 15 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -169,9 +169,9 @@
169169
<version>1.1.0</version>
170170
</plugin>
171171
<plugin>
172-
<groupId>org.sonatype.plugins</groupId>
173-
<artifactId>nexus-staging-maven-plugin</artifactId>
174-
<version>1.7.0</version>
172+
<groupId>org.sonatype.central</groupId>
173+
<artifactId>central-publishing-maven-plugin</artifactId>
174+
<version>0.8.0</version>
175175
</plugin>
176176
<plugin>
177177
<groupId>org.jacoco</groupId>
@@ -601,52 +601,38 @@
601601
</build>
602602
</profile>
603603

604-
<!-- Deploy SNAPSHOTS to OSSRH -->
604+
<!-- Deploy SNAPSHOTS to Central Portal -->
605605
<profile>
606606
<id>snapshot-deploy</id>
607-
<distributionManagement>
608-
<snapshotRepository>
609-
<id>ossrh</id>
610-
<url>https://s01.oss.sonatype.org/content/repositories/snapshots/</url>
611-
</snapshotRepository>
612-
</distributionManagement>
613607
<build>
614608
<plugins>
615609
<plugin>
616-
<groupId>org.sonatype.plugins</groupId>
617-
<artifactId>nexus-staging-maven-plugin</artifactId>
610+
<groupId>org.sonatype.central</groupId>
611+
<artifactId>central-publishing-maven-plugin</artifactId>
618612
<extensions>true</extensions>
619613
<configuration>
620-
<serverId>ossrh</serverId>
621-
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
622-
<autoReleaseAfterClose>true</autoReleaseAfterClose>
623-
<stagingProgressTimeoutMinutes>10</stagingProgressTimeoutMinutes>
614+
<publishingServerId>central</publishingServerId>
615+
<autoPublish>true</autoPublish>
616+
<waitUntil>published</waitUntil>
617+
<centralSnapshotsUrl>https://central.sonatype.com/repository/maven-snapshots/</centralSnapshotsUrl>
624618
</configuration>
625619
</plugin>
626620
</plugins>
627621
</build>
628622
</profile>
629623

630-
<!-- Deploy RELEASES to OSSRH -->
624+
<!-- Deploy RELEASES to Central Portal -->
631625
<profile>
632626
<id>release-deploy</id>
633-
<distributionManagement>
634-
<repository>
635-
<id>ossrh</id>
636-
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
637-
</repository>
638-
</distributionManagement>
639627
<build>
640628
<plugins>
641629
<plugin>
642-
<groupId>org.sonatype.plugins</groupId>
643-
<artifactId>nexus-staging-maven-plugin</artifactId>
630+
<groupId>org.sonatype.central</groupId>
631+
<artifactId>central-publishing-maven-plugin</artifactId>
644632
<extensions>true</extensions>
645633
<configuration>
646-
<serverId>ossrh</serverId>
647-
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
648-
<autoReleaseAfterClose>true</autoReleaseAfterClose>
649-
<stagingProgressTimeoutMinutes>10</stagingProgressTimeoutMinutes>
634+
<publishingServerId>central</publishingServerId>
635+
<autoPublish>true</autoPublish>
650636
</configuration>
651637
</plugin>
652638
</plugins>

0 commit comments

Comments
 (0)