Skip to content

Commit 2eb77a1

Browse files
Switch from OSSRH to Sonatype Central Portal (#1467)
Same as openzipkin/zipkin#3817 OSSRH (oss.sonatype.org) was shut down June 30, 2025. This replaces nexus-staging-maven-plugin with central-publishing-maven-plugin and updates all references accordingly. Manual steps already completed: * Generated token at https://central.sonatype.com account settings * Updated SONATYPE_USER/SONATYPE_PASSWORD at https://github.com/organizations/openzipkin/settings/secrets/actions * Enabled SNAPSHOTs at https://central.sonatype.com/publishing/namespaces (io.zipkin.brave) Signed-off-by: Adrian Cole <[email protected]>
1 parent 6eb1651 commit 2eb77a1

File tree

6 files changed

+25
-45
lines changed

6 files changed

+25
-45
lines changed

.github/workflows/deploy.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ jobs:
5858
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
5959
# SONATYPE_USER=<sonatype account token>
6060
# - deploys snapshots and releases to Sonatype
61-
# - needs access to io.zipkin via https://issues.sonatype.org/browse/OSSRH-16669
62-
# - generate via https://oss.sonatype.org/#profile;User%20Token
61+
# - needs access to io.zipkin namespace
62+
# - generate token at https://central.sonatype.com
6363
# - referenced in .settings.xml
6464
SONATYPE_USER: ${{ secrets.SONATYPE_USER }}
6565
# SONATYPE_PASSWORD=<password to sonatype account token>

.settings.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<passphrase>${env.GPG_PASSPHRASE}</passphrase>
1616
</server>
1717
<server>
18-
<id>ossrh</id>
18+
<id>central</id>
1919
<username>${env.SONATYPE_USER}</username>
2020
<password>${env.SONATYPE_PASSWORD}</password>
2121
</server>

README.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,14 +74,11 @@ All artifacts publish to the group ID "io.zipkin.brave". We use a common
7474
release version for all components.
7575

7676
### Library Releases
77-
Snapshots are uploaded to
78-
[Sonatype](https://oss.sonatype.org/content/repositories/releases) which
79-
synchronizes with
80-
[Maven Central](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22io.zipkin.brave%22)
77+
Releases are at [Maven Central](https://central.sonatype.com/search?q=brave&namespace=io.zipkin.brave)
8178

8279
### Library Snapshots
8380
Snapshots are uploaded to
84-
[Sonatype](https://oss.sonatype.org/content/repositories/snapshots) after
81+
[Sonatype](https://central.sonatype.com/repository/maven-snapshots/) after
8582
commits to master.
8683

8784
### Version alignments

RELEASE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ This repo uses semantic versions. Please keep this in mind when choosing version
2424
which creates commits, `MAJOR.MINOR.PATCH` tag, and increments the version (maven-release-plugin).
2525

2626
The `MAJOR.MINOR.PATCH` tag triggers [`build-bin/deploy`](build-bin/deploy), which does the following:
27-
* Publishes jars to https://oss.sonatype.org/content/repositories/releases [`build-bin/maven/maven_deploy`](build-bin/maven/maven_deploy)
27+
* Publishes jars to Sonatype [`build-bin/maven/maven_deploy`](build-bin/maven/maven_deploy)
2828
* Later, the same jars synchronize to Maven Central
2929
* Publishes Javadoc to https://zipkin.io/brave into a versioned subdirectory
3030

@@ -38,7 +38,7 @@ look at the notes in [.github/workflows/deploy.yml] and check the [org secrets](
3838

3939
### Troubleshooting invalid credentials
4040

41-
If you receive a '401 unauthorized' failure from OSSRH, it is likely
41+
If you receive a '401 unauthorized' failure from Sonatype, it is likely
4242
`SONATYPE_USER` or `SONATYPE_PASSWORD` entries are invalid, or possibly the
4343
user associated with them does not have rights to upload.
4444

brave-bom/pom.xml

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,9 @@
5656

5757
<distributionManagement>
5858
<snapshotRepository>
59-
<id>ossrh</id>
60-
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
59+
<id>central</id>
60+
<url>https://central.sonatype.com/repository/maven-snapshots/</url>
6161
</snapshotRepository>
62-
<repository>
63-
<id>ossrh</id>
64-
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
65-
</repository>
6662
</distributionManagement>
6763

6864
<issueManagement>
@@ -276,14 +272,13 @@
276272
<build>
277273
<plugins>
278274
<plugin>
279-
<groupId>org.sonatype.plugins</groupId>
280-
<artifactId>nexus-staging-maven-plugin</artifactId>
281-
<version>1.6.13</version>
275+
<groupId>org.sonatype.central</groupId>
276+
<artifactId>central-publishing-maven-plugin</artifactId>
282277
<extensions>true</extensions>
283278
<configuration>
284-
<serverId>ossrh</serverId>
285-
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
286-
<autoReleaseAfterClose>true</autoReleaseAfterClose>
279+
<publishingServerId>central</publishingServerId>
280+
<autoPublish>true</autoPublish>
281+
<waitUntil>published</waitUntil>
287282
</configuration>
288283
</plugin>
289284

pom.xml

Lines changed: 11 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@
156156
<maven-release-plugin.version>3.1.1</maven-release-plugin.version>
157157
<maven-source-plugin.version>3.3.1</maven-source-plugin.version>
158158
<maven-surefire-plugin.version>3.5.3</maven-surefire-plugin.version>
159-
<nexus-staging-maven-plugin.version>1.7.0</nexus-staging-maven-plugin.version>
159+
<central-publishing-maven-plugin.version>0.10.0</central-publishing-maven-plugin.version>
160160
</properties>
161161

162162
<modules>
@@ -170,13 +170,9 @@
170170

171171
<distributionManagement>
172172
<snapshotRepository>
173-
<id>ossrh</id>
174-
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
173+
<id>central</id>
174+
<url>https://central.sonatype.com/repository/maven-snapshots/</url>
175175
</snapshotRepository>
176-
<repository>
177-
<id>ossrh</id>
178-
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
179-
</repository>
180176
</distributionManagement>
181177

182178
<issueManagement>
@@ -329,9 +325,9 @@
329325
</plugin>
330326

331327
<plugin>
332-
<groupId>org.sonatype.plugins</groupId>
333-
<artifactId>nexus-staging-maven-plugin</artifactId>
334-
<version>${nexus-staging-maven-plugin.version}</version>
328+
<groupId>org.sonatype.central</groupId>
329+
<artifactId>central-publishing-maven-plugin</artifactId>
330+
<version>${central-publishing-maven-plugin.version}</version>
335331
</plugin>
336332

337333
<plugin>
@@ -666,21 +662,13 @@
666662
<build>
667663
<plugins>
668664
<plugin>
669-
<groupId>org.sonatype.plugins</groupId>
670-
<artifactId>nexus-staging-maven-plugin</artifactId>
665+
<groupId>org.sonatype.central</groupId>
666+
<artifactId>central-publishing-maven-plugin</artifactId>
671667
<extensions>true</extensions>
672668
<configuration>
673-
<serverId>ossrh</serverId>
674-
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
675-
<!-- Increase timeouts due to recent load related failures described in OSSRH-76308:
676-
677-
A message body reader for Java class com.sonatype.nexus.staging.api.dto.StagingProfileRepositoryDTO,
678-
and Java type class com.sonatype.nexus.staging.api.dto.StagingProfileRepositoryDTO,
679-
and MIME media type text/html was not found -> [Help 1]
680-
-->
681-
<stagingProgressPauseDurationSeconds>20</stagingProgressPauseDurationSeconds>
682-
<stagingProgressTimeoutMinutes>30</stagingProgressTimeoutMinutes>
683-
<autoReleaseAfterClose>true</autoReleaseAfterClose>
669+
<publishingServerId>central</publishingServerId>
670+
<autoPublish>true</autoPublish>
671+
<waitUntil>published</waitUntil>
684672
</configuration>
685673
</plugin>
686674

0 commit comments

Comments
 (0)