Skip to content

Commit 2a707ae

Browse files
marko-bekhtaDavideD
authored andcommitted
[#2305] Switch to Maven Central publishing
1 parent dbaf302 commit 2a707ae

File tree

3 files changed

+5
-11
lines changed

3 files changed

+5
-11
lines changed

ci/release/Jenkinsfile

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -195,13 +195,7 @@ pipeline {
195195
configFile(fileId: 'release.config.ssh.knownhosts', targetLocation: "${env.HOME}/.ssh/known_hosts")
196196
]) {
197197
withCredentials([
198-
// TODO: Once we switch to maven-central publishing (from nexus2) we need to add a new credentials
199-
// to use the following env variable names to set the user/password:
200-
// - JRELEASER_MAVENCENTRAL_USERNAME
201-
// - JRELEASER_MAVENCENTRAL_TOKEN
202-
// Also use the new `credentialsId` for Maven Central, e.g.:
203-
// usernamePassword(credentialsId: '???????', passwordVariable: 'JRELEASER_MAVENCENTRAL_TOKEN', usernameVariable: 'JRELEASER_MAVENCENTRAL_USERNAME'),
204-
usernamePassword(credentialsId: 'ossrh.sonatype.org', passwordVariable: 'JRELEASER_NEXUS2_PASSWORD', usernameVariable: 'JRELEASER_NEXUS2_USERNAME'),
198+
usernamePassword(credentialsId: 'central.sonatype.com', passwordVariable: 'JRELEASER_MAVENCENTRAL_TOKEN', usernameVariable: 'JRELEASER_MAVENCENTRAL_USERNAME'),
205199
gitUsernamePassword(credentialsId: 'username-and-token.Hibernate-CI.github.com', gitToolName: 'Default'),
206200
file(credentialsId: 'release.gpg.private-key', variable: 'RELEASE_GPG_PRIVATE_KEY_PATH'),
207201
string(credentialsId: 'release.gpg.passphrase', variable: 'JRELEASER_GPG_PASSPHRASE'),

ci/snapshot-publish.Jenkinsfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ pipeline {
4343
// https://github.com/gradle-nexus/publish-plugin#publishing-to-maven-central-via-sonatype-ossrh
4444
// TODO: Once we switch to maven-central publishing (from nexus2) we need to update credentialsId:
4545
// https://docs.gradle.org/current/samples/sample_publishing_credentials.html#:~:text=via%20environment%20variables
46-
usernamePassword(credentialsId: 'ossrh.sonatype.org', passwordVariable: 'ORG_GRADLE_PROJECT_snapshotsPassword', usernameVariable: 'ORG_GRADLE_PROJECT_snapshotsUsername'),
46+
usernamePassword(credentialsId: 'central.sonatype.com', passwordVariable: 'ORG_GRADLE_PROJECT_snapshotsPassword', usernameVariable: 'ORG_GRADLE_PROJECT_snapshotsUsername'),
4747
gitUsernamePassword(credentialsId: 'username-and-token.Hibernate-CI.github.com', gitToolName: 'Default'),
4848
string(credentialsId: 'Hibernate-CI.github.com', variable: 'JRELEASER_GITHUB_TOKEN')
4949
]) {

publish.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jar {
2121
'Implementation-Version': project.version,
2222
'Implementation-Vendor': 'Hibernate.org',
2323
'Implementation-Vendor-Id': 'org.hibernate',
24-
'Implementation-Url': 'http://hibernate.org/reactive',
24+
'Implementation-Url': 'https://hibernate.org/reactive',
2525
)
2626
}
2727
}
@@ -50,7 +50,7 @@ publishing {
5050
license {
5151
name = 'Apache License Version 2.0'
5252
url = 'https://opensource.org/licenses/Apache-2.0'
53-
comments = 'See discussion at http://hibernate.org/community/license/ for more details.'
53+
comments = 'See discussion at https://hibernate.org/community/license/ for more details.'
5454
distribution = 'repo'
5555
}
5656
}
@@ -81,7 +81,7 @@ publishing {
8181
}
8282
maven {
8383
name = 'snapshots'
84-
url = "https://oss.sonatype.org/content/repositories/snapshots/"
84+
url = "https://central.sonatype.com/repository/maven-snapshots/"
8585
// So that Gradle uses the `ORG_GRADLE_PROJECT_snapshotsPassword` / `ORG_GRADLE_PROJECT_snapshotsUsername`
8686
// env variables to read the username/password for the `snapshots` repository publishing:
8787
credentials(PasswordCredentials)

0 commit comments

Comments
 (0)