diff --git a/ci/snapshot-publish.Jenkinsfile b/ci/snapshot-publish.Jenkinsfile index e50d57d46421..8db51e97eba5 100644 --- a/ci/snapshot-publish.Jenkinsfile +++ b/ci/snapshot-publish.Jenkinsfile @@ -42,13 +42,9 @@ pipeline { withCredentials([ // https://github.com/gradle-nexus/publish-plugin#publishing-to-maven-central-via-sonatype-ossrh // TODO: HHH-19309: - // Once we switch to maven-central publishing (from nexus2) we need to add a new credentials - // to use the following env variable names to set the user/password: - // - JRELEASER_MAVENCENTRAL_USERNAME - // - JRELEASER_MAVENCENTRAL_TOKEN - // Also use the new `credentialsId` for Maven Central, e.g.: - // usernamePassword(credentialsId: '???????', passwordVariable: 'JRELEASER_MAVENCENTRAL_TOKEN', usernameVariable: 'JRELEASER_MAVENCENTRAL_USERNAME'), - usernamePassword(credentialsId: 'ossrh.sonatype.org', passwordVariable: 'JRELEASER_NEXUS2_PASSWORD', usernameVariable: 'JRELEASER_NEXUS2_USERNAME'), + // Once we switch to maven-central publishing (from nexus2) we need to update credentialsId: + // https://docs.gradle.org/current/samples/sample_publishing_credentials.html#:~:text=via%20environment%20variables + usernamePassword(credentialsId: 'ossrh.sonatype.org', passwordVariable: 'ORG_GRADLE_PROJECT_snapshotsPassword', usernameVariable: 'ORG_GRADLE_PROJECT_snapshotsUsername'), string(credentialsId: 'Hibernate-CI.github.com', variable: 'JRELEASER_GITHUB_TOKEN'), // https://docs.gradle.org/current/userguide/publishing_gradle_plugins.html#account_setup usernamePassword(credentialsId: 'gradle-plugin-portal-api-key', passwordVariable: 'GRADLE_PUBLISH_SECRET', usernameVariable: 'GRADLE_PUBLISH_KEY'), diff --git a/jreleaser.yml b/jreleaser.yml index 64c248a9b6db..a5974acec1e4 100644 --- a/jreleaser.yml +++ b/jreleaser.yml @@ -27,16 +27,6 @@ deploy: releaseRepository: false stagingRepositories: - target/staging-deploy/maven - maven-central-snapshot: - active: SNAPSHOT - url: https://oss.sonatype.org/service/local - snapshotUrl: https://oss.sonatype.org/content/repositories/snapshots/ - closeRepository: true - releaseRepository: true - javadocJar: false - sign: false - stagingRepositories: - - target/staging-deploy/maven mavenCentral: maven-central: # TODO: HHH-19309: Change to RELEASE once switching to Maven-Central: @@ -49,15 +39,3 @@ deploy: - target/staging-deploy/maven # Deployment identifier used for publication. # deploymentId: dd9991b0-18a7-41e7-b1fe-37b8ea936f85 - maven-central-snapshot: - # TODO: HHH-19309: Change to SNAPSHOT once switching to Maven-Central: - active: NEVER - url: https://central.sonatype.com/api/v1/publisher - snapshotSupported: true - applyMavenCentralRules: true - javadocJar: false - sign: false - stagingRepositories: - - target/staging-deploy/maven - # Deployment identifier used for publication. - # deploymentId: dd9991b0-18a7-41e7-b1fe-37b8ea936f85 diff --git a/local-build-plugins/src/main/groovy/local.publishing.gradle b/local-build-plugins/src/main/groovy/local.publishing.gradle index dc90dad2d280..9da168e89c50 100644 --- a/local-build-plugins/src/main/groovy/local.publishing.gradle +++ b/local-build-plugins/src/main/groovy/local.publishing.gradle @@ -67,6 +67,10 @@ publishingExtension.repositories { name = "staging" url = rootProject.layout.buildDirectory.dir("staging-deploy${File.separator}maven") } + maven { + name = 'snapshots' + url = "https://oss.sonatype.org/content/repositories/snapshots/" + } } // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/release/README.adoc b/release/README.adoc index e6b3130b8526..e2d08c117cb1 100644 --- a/release/README.adoc +++ b/release/README.adoc @@ -44,6 +44,8 @@ Start the appropriate Jenkins https://ci.hibernate.org/view/Release/job/hibernat NOTE: When a release is started, the job coordinates with the unified Hibernate https://github.com/hibernate/hibernate-release-scripts[release scripts] in a number of stages and steps, calling tasks on this module's link:./release.gradle[Gradle script] and leveraging link:../jreleaser.yml[JReleaser configuration]. +NOTE: Snapshot releases are not relying on JReleaser but on built-in Gradle publish plugin. See the link:../ci/snapshot-publish.Jenkinsfile[Jenkinsfile]. + At a high-level, this process: * builds and verifies the individual modules