Skip to content

Commit 22ea56f

Browse files
marko-bekhtadreab8
authored andcommitted
Moved to Central publishing
# Conflicts: # local-build-plugins/src/main/groovy/local.publishing.gradle # Conflicts: # ci/snapshot-publish.Jenkinsfile
1 parent 5acbe8b commit 22ea56f

File tree

2 files changed

+2
-10
lines changed

2 files changed

+2
-10
lines changed

ci/release/Jenkinsfile

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

gradle/publishing-pom.gradle

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

0 commit comments

Comments
 (0)