Skip to content

Commit c284177

Browse files
committed
HHH-19341 Use publish Gradle plugin for snapshot publishing
1 parent 9b82576 commit c284177

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

ci/snapshot-publish.Jenkinsfile

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,9 @@ pipeline {
4242
withCredentials([
4343
// https://github.com/gradle-nexus/publish-plugin#publishing-to-maven-central-via-sonatype-ossrh
4444
// TODO: HHH-19309:
45-
// Once we switch to maven-central publishing (from nexus2) we need to add a new credentials
46-
// to use the following env variable names to set the user/password:
47-
// - JRELEASER_MAVENCENTRAL_USERNAME
48-
// - JRELEASER_MAVENCENTRAL_TOKEN
49-
// Also use the new `credentialsId` for Maven Central, e.g.:
50-
// usernamePassword(credentialsId: '???????', passwordVariable: 'JRELEASER_MAVENCENTRAL_TOKEN', usernameVariable: 'JRELEASER_MAVENCENTRAL_USERNAME'),
51-
usernamePassword(credentialsId: 'ossrh.sonatype.org', passwordVariable: 'JRELEASER_NEXUS2_PASSWORD', usernameVariable: 'JRELEASER_NEXUS2_USERNAME'),
45+
// Once we switch to maven-central publishing (from nexus2) we need to update credentialsId:
46+
// 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'),
5248
string(credentialsId: 'Hibernate-CI.github.com', variable: 'JRELEASER_GITHUB_TOKEN'),
5349
// https://docs.gradle.org/current/userguide/publishing_gradle_plugins.html#account_setup
5450
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: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,10 @@ publishingExtension.repositories {
6767
name = "staging"
6868
url = rootProject.layout.buildDirectory.dir("staging-deploy${File.separator}maven")
6969
}
70+
maven {
71+
name = 'snapshots'
72+
url = "https://oss.sonatype.org/content/repositories/snapshots/"
73+
}
7074
}
7175

7276
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

0 commit comments

Comments
 (0)