Skip to content

Commit d7f6932

Browse files
committed
Migrate to Central Portal
Migrate from the end-of-life OSSRH sonatype service to the new Central Portal one Signed-off-by: Andrea Lamparelli <a.lamparelli95@gmail.com>
1 parent 90125e6 commit d7f6932

4 files changed

Lines changed: 14 additions & 23 deletions

File tree

.github/workflows/release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
with:
2828
distribution: 'temurin'
2929
java-version: 17
30-
server-id: ossrh
30+
server-id: central
3131
server-username: MAVEN_USERNAME
3232
server-password: MAVEN_PASSWORD
3333
- name: Setup release SSH key
@@ -55,8 +55,8 @@ jobs:
5555
mvn -B -ntp -DskipTests clean javadoc:javadoc install
5656
mvn -B -ntp -Darguments=-DskipTests -Dtag=$CUR_VER release:prepare release:perform -DreleaseVersion=$CUR_VER -DdevelopmentVersion=$NEXT_VER -Dresume=false
5757
env:
58-
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
59-
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
58+
MAVEN_USERNAME: ${{ secrets.CENTRAL_PORTAL_USERNAME }}
59+
MAVEN_PASSWORD: ${{ secrets.CENTRAL_PORTAL_PASSWORD }}
6060
GITHUB_ACTOR: ${{ github.actor }}
6161
GITHUB_TOKEN: ${{ github.token }}
6262
CI: true

docs/RELEASE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Open https://github.com/Hyperfoil/Horreum/actions/workflows/release.yml and run
1111

1212
This workflow will take care of releasing all artifacts and container images on the appropriate registries:
1313
* Create a new GitHub tag following the semantic versioning (e.g., 0.17.0-SNAPSHOT → 0.17.0)
14-
* Push the maven artifacts to [Sonatype](https://s01.oss.sonatype.org/#nexus-search;quick~horreum)
14+
* Push the maven artifacts to [Central Sonatype](https://central.sonatype.com/search?q=horreum)
1515
* Push the generated container image to [quay.io/hyperfoil/horreum](https://quay.io/repository/hyperfoil/horreum)
1616

1717
The only missing step is the creation of the GitHub release, a step that at the moment needs to be done manually using the GitHub UI. Consider using the “Generate release notes” feature to pre-populate the release notes automatically after selecting the correct tags.

horreum-backend/pom.xml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -302,13 +302,6 @@
302302
</systemPropertyVariables>
303303
</configuration>
304304
</plugin>
305-
<plugin>
306-
<groupId>org.sonatype.plugins</groupId>
307-
<artifactId>nexus-staging-maven-plugin</artifactId>
308-
<configuration>
309-
<skipNexusStagingDeployMojo>true</skipNexusStagingDeployMojo>
310-
</configuration>
311-
</plugin>
312305
<plugin>
313306
<groupId>org.codehaus.mojo</groupId>
314307
<artifactId>buildnumber-maven-plugin</artifactId>

pom.xml

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,11 @@
4646

4747
<distributionManagement>
4848
<repository>
49-
<id>ossrh</id>
50-
<url>https://s01.oss.sonatype.org/content/repositories/releases</url>
49+
<id>central</id>
50+
<url>https://central.sonatype.com</url>
5151
</repository>
5252
</distributionManagement>
5353

54-
5554
<!-- Licenses -->
5655
<licenses>
5756
<license>
@@ -68,7 +67,7 @@
6867
<maven.compiler.release>17</maven.compiler.release>
6968
<use.java11plus>true</use.java11plus>
7069

71-
<version.sonatype.nexus>1.7.0</version.sonatype.nexus>
70+
<version.sonatype.central>0.7.0</version.sonatype.central>
7271
<version.maven.antrun>3.1.0</version.maven.antrun>
7372
<version.maven.compiler>3.14.0</version.maven.compiler>
7473
<version.maven.gpg>3.2.7</version.maven.gpg>
@@ -286,9 +285,9 @@
286285
</executions>
287286
</plugin>
288287
<plugin>
289-
<groupId>org.sonatype.plugins</groupId>
290-
<artifactId>nexus-staging-maven-plugin</artifactId>
291-
<version>${version.sonatype.nexus}</version>
288+
<groupId>org.sonatype.central</groupId>
289+
<artifactId>central-publishing-maven-plugin</artifactId>
290+
<version>${version.sonatype.central}</version>
292291
</plugin>
293292
<plugin>
294293
<groupId>org.apache.maven.plugins</groupId>
@@ -446,13 +445,12 @@
446445
<plugins>
447446
<!-- To release to Nexus -->
448447
<plugin>
449-
<groupId>org.sonatype.plugins</groupId>
450-
<artifactId>nexus-staging-maven-plugin</artifactId>
448+
<groupId>org.sonatype.central</groupId>
449+
<artifactId>central-publishing-maven-plugin</artifactId>
451450
<extensions>true</extensions>
452451
<configuration>
453-
<serverId>ossrh</serverId>
454-
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
455-
<autoReleaseAfterClose>true</autoReleaseAfterClose>
452+
<publishingServerId>central</publishingServerId>
453+
<autoPublish>true</autoPublish>
456454
</configuration>
457455
</plugin>
458456
<!-- To generate javadoc -->

0 commit comments

Comments
 (0)