Skip to content

Commit da59f30

Browse files
committed
#859 Migrate Maven publication from OSSRH to Central Portal
1 parent 09c1604 commit da59f30

File tree

6 files changed

+39
-14
lines changed

6 files changed

+39
-14
lines changed

build-properties.gradle

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

3030
ext.'signing.password' = credentials.forKey('signing.password')
31-
ext.ossrhPassword = credentials.forKey('ossrhPassword')
31+
ext.centralPassword = credentials.forKey('centralPassword')
3232

3333
ext.isReleaseVersion = provider {
3434
!version.endsWith("SNAPSHOT")

chacha64-plugin/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,8 @@ publishing {
125125
maven {
126126
url = project.isReleaseVersion.get() ? project.releaseRepository : project.snapshotRepository
127127
credentials {
128-
username = findProperty('ossrhUsername') ?: null
129-
password = findProperty('ossrhPassword') ?: null
128+
username = findProperty('centralUsername') ?: null
129+
password = findProperty('centralPassword') ?: null
130130
}
131131
}
132132
}

devdoc/publish.md

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
<!--
2+
SPDX-FileCopyrightText: Copyright 2020-2025 Mark Rotteveel
3+
SPDX-License-Identifier: LicenseRef-PDL-1.0
4+
-->
15
Publishing
26
==========
37

@@ -13,7 +17,7 @@ The `assemble` task is not strictly necessary, but will also generate the `dist`
1317
zip and sign it.
1418

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

1822
To be able to deploy, you need the following:
1923

@@ -23,15 +27,36 @@ a `<homedir>/.gradle/gradle.properties` with the following properties:
2327
signing.keyId=<gpg key id>
2428
signing.secretKeyRingFile=<path to your secring.gpg>
2529
26-
ossrhUsername=<sonatype OSSRH usertoken name>
30+
centralUsername=<Central Portal usertoken name>
2731
```
2832

2933
In addition, you need to set the following credentials
3034

3135
```
3236
./gradlew addCredentials --key signing.password --value <your secret key password> -PcredentialsPassphrase=<credentials password>
33-
./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>
3438
```
3539

3640
See https://github.com/etiennestuder/gradle-credentials-plugin for details on
3741
credentials.
42+
43+
## License Notice
44+
45+
The contents of this Documentation are subject to the Public Documentation
46+
License Version 1.0 (the “License”); you may only use this Documentation if you
47+
comply with the terms of this License. A copy of the License is available at
48+
<https://firebirdsql.org/en/public-documentation-license/>.
49+
50+
The Original Documentation is "Publishing".
51+
The Initial Writer of the Original Documentation is Mark Rotteveel,
52+
Copyright © 2020-2025. All Rights Reserved. (Initial Writer contact(s):
53+
mark (at) lawinegevaar (dot) nl).
54+
55+
<!--
56+
Contributor(s): ______________________________________.
57+
Portions created by ______ are Copyright © _________ [Insert year(s)]. All Rights Reserved.
58+
(Contributor contact(s): ________________ [Insert hyperlink/alias]).
59+
-->
60+
61+
The exact file history is recorded in our Git repository; see
62+
<https://github.com/FirebirdSQL/jaybird>

gradle.properties

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

2828
# Publish properties
29-
releaseRepository=https\://oss.sonatype.org/service/local/staging/deploy/maven2/
30-
snapshotRepository=https\://oss.sonatype.org/content/repositories/snapshots/
29+
releaseRepository=https\://ossrh-staging-api.central.sonatype.com/service/local/staging/deploy/maven2/
30+
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
@@ -224,8 +224,8 @@ publishing {
224224
maven {
225225
url = project.isReleaseVersion.get() ? project.releaseRepository : project.snapshotRepository
226226
credentials {
227-
username = findProperty('ossrhUsername') ?: null
228-
password = findProperty('ossrhPassword') ?: null
227+
username = findProperty('centralUsername') ?: null
228+
password = findProperty('centralPassword') ?: null
229229
}
230230
}
231231
}

publish.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,8 @@ publishing {
164164
maven {
165165
url = project.isReleaseVersion.get() ? project.releaseRepository : project.snapshotRepository
166166
credentials {
167-
username = findProperty('ossrhUsername') ?: null
168-
password = findProperty('ossrhPassword') ?: null
167+
username = findProperty('centralUsername') ?: null
168+
password = findProperty('centralPassword') ?: null
169169
}
170170
}
171171
}
@@ -174,9 +174,9 @@ publishing {
174174
allprojects {
175175
tasks.withType(PublishToMavenRepository).each {
176176
it.doFirst {
177-
if (findProperty('ossrhUsername') == null || findProperty('ossrhPassword') == null) {
177+
if (findProperty('centralUsername') == null || findProperty('centralPassword') == null) {
178178
throw new RuntimeException('No credentials for publishing, make sure to specify the properties ' +
179-
'credentialsPassphrase, or ossrhUsername and ossrhPassword. See devdoc/publish.md for details.')
179+
'credentialsPassphrase, or centralUsername and centralPassword. See devdoc/publish.md for details.')
180180
}
181181
}
182182
}

0 commit comments

Comments
 (0)