Skip to content

Commit 0808fed

Browse files
committed
HSEARCH-5400 Switch to Maven Central publishing
1 parent af03710 commit 0808fed

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
@@ -70,12 +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: HSEARCH-5354
74-
// Once we switch to maven-central publishing (from nexus2) we need to add a new credentials
75-
// to use the following env variable names to set the user/password:
76-
// JRELEASER_MAVENCENTRAL_USERNAME
77-
// JRELEASER_MAVENCENTRAL_TOKEN
78-
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'),
7974
string(credentialsId: 'Hibernate-CI.github.com', variable: 'JRELEASER_GITHUB_TOKEN')]) {
8075
sshagent(['ed25519.Hibernate-CI.github.com', 'hibernate.filemgmt.jboss.org', 'hibernate-ci.frs.sourceforge.net']) {
8176
sh 'cat $HOME/.ssh/config'

pom.xml

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

320320
<!--
321321
We don't want to publish or sign any modules by default.
@@ -1139,14 +1139,14 @@
11391139

11401140
<distributionManagement>
11411141
<repository>
1142-
<id>${ossrh.releases.repo.id}</id>
1143-
<name>OSSRH Releases Repository</name>
1144-
<url>${ossrh.releases.repo.url}</url>
1142+
<id>${central.releases.repo.id}</id>
1143+
<name>Maven Central Releases Repository</name>
1144+
<url>${central.releases.repo.url}</url>
11451145
</repository>
11461146
<snapshotRepository>
1147-
<id>${ossrh.snapshots.repo.id}</id>
1148-
<name>OSSRH Snapshots Repository</name>
1149-
<url>${ossrh.snapshots.repo.url}</url>
1147+
<id>${central.snapshots.repo.id}</id>
1148+
<name>Maven Central Snapshots Repository</name>
1149+
<url>${central.snapshots.repo.url}</url>
11501150
</snapshotRepository>
11511151
</distributionManagement>
11521152

0 commit comments

Comments
 (0)