Skip to content

Commit 4391e09

Browse files
marko-bekhtasebersole
authored andcommitted
Add maven-central publishing placeholder
1 parent 993f83f commit 4391e09

File tree

2 files changed

+20
-4
lines changed

2 files changed

+20
-4
lines changed

ci/release/Jenkinsfile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,14 @@ pipeline {
5252
configFile(fileId: 'release.config.ssh.knownhosts', targetLocation: env.HOME + '/.ssh/known_hosts')]) {
5353
// using MAVEN_GPG_PASSPHRASE (the default env variable name for passphrase in maven gpg plugin)
5454
withCredentials([file(credentialsId: 'release.gpg.private-key', variable: 'RELEASE_GPG_PRIVATE_KEY_PATH'),
55-
string(credentialsId: 'release.gpg.passphrase', variable: 'JRELEASER_GPG_PASSPHRASE'),
55+
// TODO: Once we switch to maven-central publishing (from nexus2) we need to add a new credentials
56+
// to use the following env variable names to set the user/password:
57+
// - JRELEASER_MAVENCENTRAL_USERNAME
58+
// - JRELEASER_MAVENCENTRAL_TOKEN
59+
// Also use the new `credentialsId` for Maven Central, e.g.:
60+
// usernamePassword(credentialsId: '???????', passwordVariable: 'JRELEASER_MAVENCENTRAL_TOKEN', usernameVariable: 'JRELEASER_MAVENCENTRAL_USERNAME'),
5661
usernamePassword(credentialsId: 'ossrh.sonatype.org', passwordVariable: 'JRELEASER_NEXUS2_PASSWORD', usernameVariable: 'JRELEASER_NEXUS2_USERNAME'),
62+
string(credentialsId: 'release.gpg.passphrase', variable: 'JRELEASER_GPG_PASSPHRASE'),
5763
string(credentialsId: 'Hibernate-CI.github.com', variable: 'JRELEASER_GITHUB_TOKEN')]) {
5864
sshagent(['ed25519.Hibernate-CI.github.com']) {
5965
sh 'cat $HOME/.ssh/config'

jreleaser.yml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,28 @@ release:
1212
# File signing is always active
1313
signing:
1414
mode: COMMAND
15-
active: ALWAYS
15+
active: RELEASE
1616
armored: true
1717

1818
# Deploy JARs and POMs to Maven Central
1919
deploy:
2020
maven:
2121
nexus2:
2222
maven-central:
23-
active: ALWAYS
23+
active: RELEASE
2424
url: https://oss.sonatype.org/service/local
2525
snapshotUrl: https://oss.sonatype.org/content/repositories/snapshots/
2626
closeRepository: true
27-
releaseRepository: true
2827
stagingRepositories:
2928
- build/staging-deploy/maven
29+
mavenCentral:
30+
maven-central:
31+
# TODO: Change to RELEASE once switching to Maven-Central:
32+
active: NEVER
33+
url: https://central.sonatype.com/api/v1/publisher
34+
snapshotSupported: false
35+
applyMavenCentralRules: true
36+
stagingRepositories:
37+
- build/staging-deploy/maven
38+
# Deployment identifier used for publication.
39+
# deploymentId: dd9991b0-18a7-41e7-b1fe-37b8ea936f85

0 commit comments

Comments
 (0)