Skip to content

Commit 4fc39fe

Browse files
committed
Migrate OSSRH to Central Portal
1 parent d097f86 commit 4fc39fe

4 files changed

Lines changed: 23 additions & 39 deletions

File tree

.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 & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,9 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

88
## [Unreleased]
99

10-
### Added
11-
1210
### Changed
1311

14-
### Fixed
12+
- Migrate OSSRH to Central Portal
1513

1614
## [1.0.1] - 2021-03-22
1715

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
@@ -201,9 +201,9 @@
201201
<version>1.1.0</version>
202202
</plugin>
203203
<plugin>
204-
<groupId>org.sonatype.plugins</groupId>
205-
<artifactId>nexus-staging-maven-plugin</artifactId>
206-
<version>1.7.0</version>
204+
<groupId>org.sonatype.central</groupId>
205+
<artifactId>central-publishing-maven-plugin</artifactId>
206+
<version>0.8.0</version>
207207
</plugin>
208208
<plugin>
209209
<groupId>org.jacoco</groupId>
@@ -639,52 +639,38 @@
639639
</build>
640640
</profile>
641641

642-
<!-- Deploy SNAPSHOTS to OSSRH -->
642+
<!-- Deploy SNAPSHOTS to Central Portal -->
643643
<profile>
644644
<id>snapshot-deploy</id>
645-
<distributionManagement>
646-
<snapshotRepository>
647-
<id>ossrh</id>
648-
<url>https://s01.oss.sonatype.org/content/repositories/snapshots/</url>
649-
</snapshotRepository>
650-
</distributionManagement>
651645
<build>
652646
<plugins>
653647
<plugin>
654-
<groupId>org.sonatype.plugins</groupId>
655-
<artifactId>nexus-staging-maven-plugin</artifactId>
648+
<groupId>org.sonatype.central</groupId>
649+
<artifactId>central-publishing-maven-plugin</artifactId>
656650
<extensions>true</extensions>
657651
<configuration>
658-
<serverId>ossrh</serverId>
659-
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
660-
<autoReleaseAfterClose>true</autoReleaseAfterClose>
661-
<stagingProgressTimeoutMinutes>10</stagingProgressTimeoutMinutes>
652+
<publishingServerId>central</publishingServerId>
653+
<autoPublish>true</autoPublish>
654+
<waitUntil>published</waitUntil>
655+
<centralSnapshotsUrl>https://central.sonatype.com/repository/maven-snapshots/</centralSnapshotsUrl>
662656
</configuration>
663657
</plugin>
664658
</plugins>
665659
</build>
666660
</profile>
667661

668-
<!-- Deploy RELEASES to OSSRH -->
662+
<!-- Deploy RELEASES to Central Portal -->
669663
<profile>
670664
<id>release-deploy</id>
671-
<distributionManagement>
672-
<repository>
673-
<id>ossrh</id>
674-
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
675-
</repository>
676-
</distributionManagement>
677665
<build>
678666
<plugins>
679667
<plugin>
680-
<groupId>org.sonatype.plugins</groupId>
681-
<artifactId>nexus-staging-maven-plugin</artifactId>
668+
<groupId>org.sonatype.central</groupId>
669+
<artifactId>central-publishing-maven-plugin</artifactId>
682670
<extensions>true</extensions>
683671
<configuration>
684-
<serverId>ossrh</serverId>
685-
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
686-
<autoReleaseAfterClose>true</autoReleaseAfterClose>
687-
<stagingProgressTimeoutMinutes>10</stagingProgressTimeoutMinutes>
672+
<publishingServerId>central</publishingServerId>
673+
<autoPublish>true</autoPublish>
688674
</configuration>
689675
</plugin>
690676
</plugins>

0 commit comments

Comments
 (0)