Skip to content

Commit 74d63ed

Browse files
Switch from OSSRH to Sonatype Central Portal
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) Signed-off-by: Adrian Cole <adrian@tetrate.io>
1 parent 931026b commit 74d63ed

File tree

8 files changed

+44
-52
lines changed

8 files changed

+44
-52
lines changed

.github/workflows/deploy.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ jobs:
4949
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
5050
# SONATYPE_USER=<sonatype account token>
5151
# * deploys snapshots and releases to Sonatype
52-
# * needs access to io.zipkin via OSSRH-16669
53-
# * generate via https://oss.sonatype.org/#profile;User%20Token
52+
# * needs access to io.zipkin namespace
53+
# * generate token at https://central.sonatype.com
5454
# * referenced in .settings.xml
5555
SONATYPE_USER: ${{ secrets.SONATYPE_USER }}
5656
# 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: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[![Gitter chat](http://img.shields.io/badge/gitter-join%20chat%20%E2%86%92-brightgreen.svg)](https://gitter.im/openzipkin/zipkin)
22
[![Build Status](https://travis-ci.org/openzipkin/zipkin-dependencies.svg?branch=master)](https://travis-ci.org/openzipkin/zipkin-dependencies)
3-
[![Maven Central](https://img.shields.io/maven-central/v/io.zipkin.dependencies/zipkin-dependencies.svg)](https://search.maven.org/search?q=g:io.zipkin.dependencies%20AND%20a:zipkin-dependencies)
3+
[![Maven Central](https://img.shields.io/maven-central/v/io.zipkin.dependencies/zipkin-dependencies.svg)](https://central.sonatype.com/search?q=zipkin-dependencies&namespace=io.zipkin.dependencies)
44

55
# zipkin-dependencies
66

@@ -21,7 +21,7 @@ are supported, including Cassandra, MySQL and Elasticsearch.
2121

2222
Until [SPARK-43831](https://issues.apache.org/jira/browse/SPARK-43831), Zipkin Dependencies requires Java 17 to run.
2323

24-
The quickest way to get started is to fetch the [latest released job](https://search.maven.org/remote_content?g=io.zipkin.dependencies&a=zipkin-dependencies&v=LATEST) as a self-contained jar. For example:
24+
The quickest way to get started is to fetch the [latest released job](https://central.sonatype.com/search?q=zipkin-dependencies&namespace=io.zipkin.dependencies&sort=published) as a self-contained jar. For example:
2525

2626
```bash
2727
$ curl -sSL https://zipkin.io/quickstart.sh | bash -s io.zipkin.dependencies:zipkin-dependencies:LATEST zipkin-dependencies.jar
@@ -174,10 +174,10 @@ All artifacts publish to the group ID "io.zipkin.dependencies". We use a common
174174
release version for all components.
175175

176176
### Library Releases
177-
Releases are at [Maven Central](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22io.zipkin.dependencies%22)
177+
Releases are at [Maven Central](https://central.sonatype.com/search?q=zipkin-dependencies&namespace=io.zipkin.dependencies)
178178

179179
### Library Snapshots
180-
Snapshots are uploaded to [Sonatype](https://oss.sonatype.org/content/repositories/snapshots) after
180+
Snapshots are uploaded to [Sonatype](https://central.sonatype.com/repository/maven-snapshots/) after
181181
commits to master.
182182

183183
### Docker Images

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
* Pushes images to Docker registries [`build-bin/docker_push`](build-bin/docker_push)
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

build-bin/README.md

Lines changed: 25 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -61,14 +61,19 @@ Actions includes the ability to skip documentation-only jobs.
6161

6262
Here's a partial `test.yml` including only the aspects mentioned above.
6363
```yaml
64-
on:
65-
push:
66-
tags: ''
67-
branches: master
68-
paths-ignore: '**/*.md'
69-
pull_request:
70-
branches: master
71-
paths-ignore: '**/*.md'
64+
on: # yamllint disable-line rule:truthy
65+
push: # non-tagged pushes to master
66+
branches:
67+
- master
68+
tags-ignore:
69+
- '*'
70+
paths-ignore:
71+
- '**/*.md'
72+
pull_request: # pull requests targeted at the master branch.
73+
branches:
74+
- master
75+
paths-ignore:
76+
- '**/*.md'
7277

7378
jobs:
7479
test:
@@ -105,22 +110,26 @@ Here's a partial `deploy.yml` including only the aspects mentioned above. Notice
105110
explicitly defined and `on.tags` is a [glob pattern](https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions#filter-pattern-cheat-sheet).
106111

107112
```yaml
108-
on:
113+
on: # yamllint disable-line rule:truthy
109114
push:
110-
tags: '[0-9]+.[0-9]+.[0-9]+**' # e.g. 8.272.10 or 15.0.1_p9
111-
branches: master
115+
branches:
116+
- master
117+
# Don't deploy tags because the same commit for MAJOR.MINOR.PATCH is also
118+
# on master: Redundant deployment of a release version will fail uploading.
119+
tags-ignore:
120+
- '*'
112121
113122
jobs:
114123
deploy:
124+
runs-on: ubuntu-24.04 # newest available distribution, aka noble
115125
steps:
116126
- name: Checkout Repository
117127
uses: actions/checkout@v4
118-
- name: Configure Deploy
119-
run: build-bin/configure_deploy
128+
- name: Deploy
120129
env:
121130
GH_USER: ${{ secrets.GH_USER }}
122131
GH_TOKEN: ${{ secrets.GH_TOKEN }}
123-
- name: Deploy
124-
# GITHUB_REF will be refs/heads/master or refs/tags/1.2.3
125-
run: build-bin/deploy $(echo ${GITHUB_REF} | cut -d/ -f 3)
132+
run: | # GITHUB_REF = refs/heads/master or refs/tags/MAJOR.MINOR.PATCH
133+
build-bin/configure_deploy &&
134+
build-bin/deploy $(echo ${GITHUB_REF} | cut -d/ -f 3)
126135
```

build-bin/maven/maven_unjar

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,12 +68,6 @@ if ! test -f ${artifact_id}.jar && [ ${is_release} = "true" ]; then
6868
echo "*** Resolving ${qualified_jar} from Maven default repositories..."
6969
${mvn_get} || true
7070

71-
# Don't add load to Sonatype releases repository except when central sync is delayed
72-
if ! test -f ${local_repo_path}; then
73-
echo "*** Resolving ${qualified_jar} from Maven Sonatype releases repository..."
74-
${mvn_get} -DremoteRepositories=https://oss.sonatype.org/content/repositories/releases
75-
fi
76-
7771
cp ${local_repo_path} ${artifact_id}.jar
7872
fi
7973

build-bin/mlc_config.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
{
22
"ignorePatterns": [
3-
{
4-
"pattern": "https://oss.sonatype.org/content/repositories/snapshots"
5-
},
63
{
74
"pattern": "http://localhost:9411/zipkin/dependency"
85
},

pom.xml

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@
134134
<maven-shade-plugin.version>3.5.3</maven-shade-plugin.version>
135135
<maven-source-plugin.version>3.3.1</maven-source-plugin.version>
136136
<maven-surefire-plugin.version>3.2.5</maven-surefire-plugin.version>
137-
<nexus-staging-maven-plugin.version>1.6.13</nexus-staging-maven-plugin.version>
137+
<central-publishing-maven-plugin.version>0.10.0</central-publishing-maven-plugin.version>
138138
</properties>
139139

140140
<name>Zipkin Dependencies (Parent)</name>
@@ -173,13 +173,9 @@
173173

174174
<distributionManagement>
175175
<snapshotRepository>
176-
<id>ossrh</id>
177-
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
176+
<id>central</id>
177+
<url>https://central.sonatype.com/repository/maven-snapshots/</url>
178178
</snapshotRepository>
179-
<repository>
180-
<id>ossrh</id>
181-
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
182-
</repository>
183179
</distributionManagement>
184180

185181
<issueManagement>
@@ -381,9 +377,9 @@
381377
</plugin>
382378

383379
<plugin>
384-
<groupId>org.sonatype.plugins</groupId>
385-
<artifactId>nexus-staging-maven-plugin</artifactId>
386-
<version>${nexus-staging-maven-plugin.version}</version>
380+
<groupId>org.sonatype.central</groupId>
381+
<artifactId>central-publishing-maven-plugin</artifactId>
382+
<version>${central-publishing-maven-plugin.version}</version>
387383
</plugin>
388384
</plugins>
389385
</pluginManagement>
@@ -614,16 +610,12 @@
614610
<build>
615611
<plugins>
616612
<plugin>
617-
<groupId>org.sonatype.plugins</groupId>
618-
<artifactId>nexus-staging-maven-plugin</artifactId>
613+
<groupId>org.sonatype.central</groupId>
614+
<artifactId>central-publishing-maven-plugin</artifactId>
619615
<extensions>true</extensions>
620616
<configuration>
621-
<serverId>ossrh</serverId>
622-
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
623-
<!-- Double the normal timeout even though we haven't had a problem in this project.
624-
The only outcome of timing out client side is trying again. -->
625-
<stagingProgressTimeoutMinutes>10</stagingProgressTimeoutMinutes>
626-
<autoReleaseAfterClose>true</autoReleaseAfterClose>
617+
<publishingServerId>central</publishingServerId>
618+
<autoPublish>true</autoPublish>
627619
</configuration>
628620
</plugin>
629621

0 commit comments

Comments
 (0)