Skip to content

Commit 516cd85

Browse files
committed
HV-2118 Switch to Maven Central publishing
1 parent 13807ee commit 516cd85

File tree

2 files changed

+11
-15
lines changed

2 files changed

+11
-15
lines changed

jenkins/release/Jenkinsfile

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,7 @@ pipeline {
7070
// using MAVEN_GPG_PASSPHRASE (the default env variable name for passphrase in maven gpg plugin)
7171
withCredentials([file(credentialsId: 'release.gpg.private-key', variable: 'RELEASE_GPG_PRIVATE_KEY_PATH'),
7272
string(credentialsId: 'release.gpg.passphrase', variable: 'JRELEASER_GPG_PASSPHRASE'),
73-
// TODO: Once we switch to maven-central publishing (from nexus2) we need to add a new credentials
74-
// to use the following env variable names to set the user/password:
75-
// JRELEASER_MAVENCENTRAL_USERNAME
76-
// JRELEASER_MAVENCENTRAL_TOKEN
77-
usernamePassword(credentialsId: 'ossrh.sonatype.org', passwordVariable: 'JRELEASER_NEXUS2_PASSWORD', usernameVariable: 'JRELEASER_NEXUS2_USERNAME'),
73+
usernamePassword(credentialsId: 'central.sonatype.com', passwordVariable: 'JRELEASER_MAVENCENTRAL_TOKEN', usernameVariable: 'JRELEASER_MAVENCENTRAL_USERNAME'),
7874
string(credentialsId: 'Hibernate-CI.github.com', variable: 'JRELEASER_GITHUB_TOKEN')]) {
7975
sshagent(['ed25519.Hibernate-CI.github.com', 'hibernate.filemgmt.jboss.org', 'hibernate-ci.frs.sourceforge.net']) {
8076
sh 'cat $HOME/.ssh/config'

pom.xml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -277,10 +277,10 @@
277277
<!-- We always publish to a local directory, JReleaser is supposed to take care of publishing to Nexus: -->
278278
<local.staging.releases.repo.id>staging-deploy</local.staging.releases.repo.id>
279279
<local.staging.releases.repo.url>file:${maven.multiModuleProjectDirectory}/target/staging-deploy/maven</local.staging.releases.repo.url>
280-
<ossrh.releases.repo.id>ossrh</ossrh.releases.repo.id>
281-
<ossrh.releases.repo.url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</ossrh.releases.repo.url>
282-
<ossrh.snapshots.repo.id>ossrh</ossrh.snapshots.repo.id>
283-
<ossrh.snapshots.repo.url>https://oss.sonatype.org/content/repositories/snapshots</ossrh.snapshots.repo.url>
280+
<central.releases.repo.id>central-releases</central.releases.repo.id>
281+
<central.releases.repo.url>https://central.sonatype.com/api/v1/publisher/</central.releases.repo.url>
282+
<central.snapshots.repo.id>central-snapshots</central.snapshots.repo.id>
283+
<central.snapshots.repo.url>https://central.sonatype.com/repository/maven-snapshots/</central.snapshots.repo.url>
284284

285285
<!--
286286
We don't want to publish or sign any modules by default.
@@ -1618,14 +1618,14 @@
16181618

16191619
<distributionManagement>
16201620
<repository>
1621-
<id>${ossrh.releases.repo.id}</id>
1622-
<name>OSSRH Releases Repository</name>
1623-
<url>${ossrh.releases.repo.url}</url>
1621+
<id>${central.releases.repo.id}</id>
1622+
<name>Maven Central Releases Repository</name>
1623+
<url>${central.releases.repo.url}</url>
16241624
</repository>
16251625
<snapshotRepository>
1626-
<id>${ossrh.snapshots.repo.id}</id>
1627-
<name>OSSRH Snapshots Repository</name>
1628-
<url>${ossrh.snapshots.repo.url}</url>
1626+
<id>${central.snapshots.repo.id}</id>
1627+
<name>Maven Central Snapshots Repository</name>
1628+
<url>${central.snapshots.repo.url}</url>
16291629
</snapshotRepository>
16301630
</distributionManagement>
16311631

0 commit comments

Comments
 (0)