Skip to content

Commit 23ac16c

Browse files
marko-bekhtadreab8
authored andcommitted
Moved to Central publishing
1 parent 4b0ee04 commit 23ac16c

File tree

3 files changed

+3
-13
lines changed

3 files changed

+3
-13
lines changed

ci/release/Jenkinsfile

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -208,15 +208,7 @@ pipeline {
208208
configFile(fileId: 'release.config.ssh.knownhosts', targetLocation: "${env.HOME}/.ssh/known_hosts")
209209
]) {
210210
withCredentials([
211-
// https://github.com/gradle-nexus/publish-plugin#publishing-to-maven-central-via-sonatype-ossrh
212-
// TODO: HHH-19309:
213-
// Once we switch to maven-central publishing (from nexus2) we need to add a new credentials
214-
// to use the following env variable names to set the user/password:
215-
// - JRELEASER_MAVENCENTRAL_USERNAME
216-
// - JRELEASER_MAVENCENTRAL_TOKEN
217-
// Also use the new `credentialsId` for Maven Central, e.g.:
218-
// usernamePassword(credentialsId: '???????', passwordVariable: 'JRELEASER_MAVENCENTRAL_TOKEN', usernameVariable: 'JRELEASER_MAVENCENTRAL_USERNAME'),
219-
usernamePassword(credentialsId: 'ossrh.sonatype.org', passwordVariable: 'JRELEASER_NEXUS2_PASSWORD', usernameVariable: 'JRELEASER_NEXUS2_USERNAME'),
211+
usernamePassword(credentialsId: 'central.sonatype.com', passwordVariable: 'JRELEASER_MAVENCENTRAL_TOKEN', usernameVariable: 'JRELEASER_MAVENCENTRAL_USERNAME'),
220212
// https://docs.gradle.org/current/userguide/publishing_gradle_plugins.html#account_setup
221213
usernamePassword(credentialsId: 'gradle-plugin-portal-api-key', passwordVariable: 'GRADLE_PUBLISH_SECRET', usernameVariable: 'GRADLE_PUBLISH_KEY'),
222214
gitUsernamePassword(credentialsId: 'username-and-token.Hibernate-CI.github.com', gitToolName: 'Default'),

ci/snapshot-publish.Jenkinsfile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,8 @@ pipeline {
4141
script {
4242
withCredentials([
4343
// https://github.com/gradle-nexus/publish-plugin#publishing-to-maven-central-via-sonatype-ossrh
44-
// TODO: HHH-19309:
45-
// Once we switch to maven-central publishing (from nexus2) we need to update credentialsId:
4644
// https://docs.gradle.org/current/samples/sample_publishing_credentials.html#:~:text=via%20environment%20variables
47-
usernamePassword(credentialsId: 'ossrh.sonatype.org', passwordVariable: 'ORG_GRADLE_PROJECT_snapshotsPassword', usernameVariable: 'ORG_GRADLE_PROJECT_snapshotsUsername'),
45+
usernamePassword(credentialsId: 'central.sonatype.com', passwordVariable: 'ORG_GRADLE_PROJECT_snapshotsPassword', usernameVariable: 'ORG_GRADLE_PROJECT_snapshotsUsername'),
4846
string(credentialsId: 'Hibernate-CI.github.com', variable: 'JRELEASER_GITHUB_TOKEN'),
4947
// https://docs.gradle.org/current/userguide/publishing_gradle_plugins.html#account_setup
5048
usernamePassword(credentialsId: 'gradle-plugin-portal-api-key', passwordVariable: 'GRADLE_PUBLISH_SECRET', usernameVariable: 'GRADLE_PUBLISH_KEY'),

local-build-plugins/src/main/groovy/local.publishing.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ publishingExtension.repositories {
6969
}
7070
maven {
7171
name = 'snapshots'
72-
url = "https://oss.sonatype.org/content/repositories/snapshots/"
72+
url = "https://central.sonatype.com/repository/maven-snapshots/"
7373
// So that Gradle uses the `ORG_GRADLE_PROJECT_snapshotsPassword` / `ORG_GRADLE_PROJECT_snapshotsUsername`
7474
// env variables to read the username/password for the `snapshots` repository publishing:
7575
credentials(PasswordCredentials)

0 commit comments

Comments
 (0)