From 7cd90948f68dd05d3e4c9d61759f3977c24fa8b7 Mon Sep 17 00:00:00 2001 From: marko-bekhta Date: Sat, 14 Jun 2025 00:25:29 +0200 Subject: [PATCH] HV-2118 Switch to Maven Central publishing --- jenkins/release/Jenkinsfile | 6 +----- pom.xml | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 15 deletions(-) diff --git a/jenkins/release/Jenkinsfile b/jenkins/release/Jenkinsfile index 0af27ba9d..b3b2c9bb7 100644 --- a/jenkins/release/Jenkinsfile +++ b/jenkins/release/Jenkinsfile @@ -70,11 +70,7 @@ pipeline { // using MAVEN_GPG_PASSPHRASE (the default env variable name for passphrase in maven gpg plugin) withCredentials([file(credentialsId: 'release.gpg.private-key', variable: 'RELEASE_GPG_PRIVATE_KEY_PATH'), string(credentialsId: 'release.gpg.passphrase', variable: 'JRELEASER_GPG_PASSPHRASE'), - // TODO: 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 - usernamePassword(credentialsId: 'ossrh.sonatype.org', passwordVariable: 'JRELEASER_NEXUS2_PASSWORD', usernameVariable: 'JRELEASER_NEXUS2_USERNAME'), + usernamePassword(credentialsId: 'central.sonatype.com', passwordVariable: 'JRELEASER_MAVENCENTRAL_TOKEN', usernameVariable: 'JRELEASER_MAVENCENTRAL_USERNAME'), string(credentialsId: 'Hibernate-CI.github.com', variable: 'JRELEASER_GITHUB_TOKEN')]) { sshagent(['ed25519.Hibernate-CI.github.com', 'hibernate.filemgmt.jboss.org', 'hibernate-ci.frs.sourceforge.net']) { sh 'cat $HOME/.ssh/config' diff --git a/pom.xml b/pom.xml index f787beaf4..a61ceff5d 100644 --- a/pom.xml +++ b/pom.xml @@ -277,10 +277,10 @@ staging-deploy file:${maven.multiModuleProjectDirectory}/target/staging-deploy/maven - ossrh - https://oss.sonatype.org/service/local/staging/deploy/maven2/ - ossrh - https://oss.sonatype.org/content/repositories/snapshots + central-releases + https://central.sonatype.com/api/v1/publisher/ + central-snapshots + https://central.sonatype.com/repository/maven-snapshots/