Skip to content

Commit c5c820d

Browse files
committed
HSEARCH-5400 Switch to Maven Central publishing
1 parent d0f7bc3 commit c5c820d

File tree

2 files changed

+11
-16
lines changed

2 files changed

+11
-16
lines changed

ci/release/Jenkinsfile

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

pom.xml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -309,10 +309,10 @@
309309
<!-- We always publish to a local directory, JReleaser is supposed to take care of publishing to Nexus: -->
310310
<local.staging.releases.repo.id>staging-deploy</local.staging.releases.repo.id>
311311
<local.staging.releases.repo.url>file:${maven.multiModuleProjectDirectory}/target/staging-deploy/maven</local.staging.releases.repo.url>
312-
<ossrh.releases.repo.id>ossrh</ossrh.releases.repo.id>
313-
<ossrh.releases.repo.url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</ossrh.releases.repo.url>
314-
<ossrh.snapshots.repo.id>ossrh</ossrh.snapshots.repo.id>
315-
<ossrh.snapshots.repo.url>https://oss.sonatype.org/content/repositories/snapshots</ossrh.snapshots.repo.url>
312+
<central.releases.repo.id>central-releases</central.releases.repo.id>
313+
<central.releases.repo.url>https://central.sonatype.com/api/v1/publisher/</central.releases.repo.url>
314+
<central.snapshots.repo.id>central-snapshots</central.snapshots.repo.id>
315+
<central.snapshots.repo.url>https://central.sonatype.com/repository/maven-snapshots/</central.snapshots.repo.url>
316316

317317
<!--
318318
We don't want to publish or sign any modules by default.
@@ -1219,14 +1219,14 @@
12191219

12201220
<distributionManagement>
12211221
<repository>
1222-
<id>${ossrh.releases.repo.id}</id>
1223-
<name>OSSRH Releases Repository</name>
1224-
<url>${ossrh.releases.repo.url}</url>
1222+
<id>${central.releases.repo.id}</id>
1223+
<name>Maven Central Releases Repository</name>
1224+
<url>${central.releases.repo.url}</url>
12251225
</repository>
12261226
<snapshotRepository>
1227-
<id>${ossrh.snapshots.repo.id}</id>
1228-
<name>OSSRH Snapshots Repository</name>
1229-
<url>${ossrh.snapshots.repo.url}</url>
1227+
<id>${central.snapshots.repo.id}</id>
1228+
<name>Maven Central Snapshots Repository</name>
1229+
<url>${central.snapshots.repo.url}</url>
12301230
</snapshotRepository>
12311231
</distributionManagement>
12321232

0 commit comments

Comments
 (0)