Skip to content

Commit 271f5b1

Browse files
committed
#859 Migrate Maven publication from OSSRH to Central Portal
1 parent e42ce77 commit 271f5b1

File tree

6 files changed

+16
-16
lines changed

6 files changed

+16
-16
lines changed

build-properties.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ ext.'version.simple' = "${project.'version.major'}.${project.'version.minor'}.${
3232
ext.'version.maven' = "${project.'version.simple'}${project.'version.tag'}".toString()
3333

3434
ext.'signing.password' = credentials.forKey('signing.password')
35-
ext.ossrhPassword = credentials.forKey('ossrhPassword')
35+
ext.centralPassword = credentials.forKey('centralPassword')
3636

3737
ext.isReleaseVersion = provider {
3838
!version.endsWith("SNAPSHOT")

chacha64-plugin/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,8 @@ publishing {
132132
maven {
133133
url = project.isReleaseVersion.get() ? project.releaseRepository : project.snapshotRepository
134134
credentials {
135-
username = findProperty('ossrhUsername') ?: null
136-
password = findProperty('ossrhPassword') ?: null
135+
username = findProperty('centralUsername') ?: null
136+
password = findProperty('centralPassword') ?: null
137137
}
138138
}
139139
}

devdoc/publish.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
SPDX-FileCopyrightText: Copyright 2020-2024 Mark Rotteveel
2+
SPDX-FileCopyrightText: Copyright 2020-2025 Mark Rotteveel
33
SPDX-License-Identifier: LicenseRef-PDL-1.0
44
-->
55
Publishing
@@ -17,7 +17,7 @@ The `assemble` task is not strictly necessary, but will also generate the `dist`
1717
zip and sign it.
1818

1919
Publishing to Maven Central (non-SNAPSHOT releases) requires an explicit close
20-
and release through <https://oss.sonatype.org/>.
20+
and release through <https://central.sonatype.com/publishing/deployments>.
2121

2222
To be able to deploy, you need the following:
2323

@@ -27,14 +27,14 @@ a `<homedir>/.gradle/gradle.properties` with the following properties:
2727
signing.keyId=<gpg key id>
2828
signing.secretKeyRingFile=<path to your secring.gpg>
2929
30-
ossrhUsername=<sonatype OSSRH usertoken name>
30+
centralUsername=<Central Portal usertoken name>
3131
```
3232

3333
In addition, you need to set the following credentials
3434

3535
```
3636
./gradlew addCredentials --key signing.password --value <your secret key password> -PcredentialsPassphrase=<credentials password>
37-
./gradlew addCredentials --key ossrhPassword --value <your sonatyp OSSRH password> -PcredentialsPassphrase=<credentials password>
37+
./gradlew addCredentials --key centralPassword --value <your Central Portal usertoken password> -PcredentialsPassphrase=<credentials password>
3838
```
3939

4040
See https://github.com/etiennestuder/gradle-credentials-plugin for details on
@@ -49,7 +49,7 @@ comply with the terms of this License. A copy of the License is available at
4949

5050
The Original Documentation is "Publishing".
5151
The Initial Writer of the Original Documentation is Mark Rotteveel,
52-
Copyright © 2020-2024. All Rights Reserved. (Initial Writer contact(s):
52+
Copyright © 2020-2025. All Rights Reserved. (Initial Writer contact(s):
5353
mark (at) lawinegevaar (dot) nl).
5454

5555
<!--

gradle.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,5 @@ test.use.firebird.autocommit=false
2929
test.enableProtocol=*
3030

3131
# Publish properties
32-
releaseRepository=https\://oss.sonatype.org/service/local/staging/deploy/maven2/
33-
snapshotRepository=https\://oss.sonatype.org/content/repositories/snapshots/
32+
releaseRepository=https\://ossrh-staging-api.central.sonatype.com/service/local/staging/deploy/maven2/
33+
snapshotRepository=https\://central.sonatype.com/repository/maven-snapshots/

jaybird-native/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,8 +231,8 @@ publishing {
231231
maven {
232232
url = project.isReleaseVersion.get() ? project.releaseRepository : project.snapshotRepository
233233
credentials {
234-
username = findProperty('ossrhUsername') ?: null
235-
password = findProperty('ossrhPassword') ?: null
234+
username = findProperty('centralUsername') ?: null
235+
password = findProperty('centralPassword') ?: null
236236
}
237237
}
238238
}

publish.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -177,8 +177,8 @@ publishing {
177177
maven {
178178
url = project.isReleaseVersion.get() ? project.releaseRepository : project.snapshotRepository
179179
credentials {
180-
username = findProperty('ossrhUsername') ?: null
181-
password = findProperty('ossrhPassword') ?: null
180+
username = findProperty('centralUsername') ?: null
181+
password = findProperty('centralPassword') ?: null
182182
}
183183
}
184184
}
@@ -187,9 +187,9 @@ publishing {
187187
allprojects {
188188
tasks.withType(PublishToMavenRepository).each {
189189
it.doFirst {
190-
if (findProperty('ossrhUsername') == null || findProperty('ossrhPassword') == null) {
190+
if (findProperty('centralUsername') == null || findProperty('centralPassword') == null) {
191191
throw new RuntimeException('No credentials for publishing, make sure to specify the properties ' +
192-
'credentialsPassphrase, or ossrhUsername and ossrhPassword. See devdoc/publish.md for details.')
192+
'credentialsPassphrase, or centralUsername and centralPassword. See devdoc/publish.md for details.')
193193
}
194194
}
195195
}

0 commit comments

Comments
 (0)