Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions ci/release/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,16 @@ pipeline {
mavenLocalRepo: env.WORKSPACE_TMP + '/.m2repository') {
configFileProvider([configFile(fileId: 'release.config.ssh', targetLocation: env.HOME + '/.ssh/config'),
configFile(fileId: 'release.config.ssh.knownhosts', targetLocation: env.HOME + '/.ssh/known_hosts')]) {
// 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: 'MAVEN_GPG_PASSPHRASE')]) {
withCredentials([// 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
// Also use the new `credentialsId` for Maven Central, e.g.:
// usernamePassword(credentialsId: '???????', passwordVariable: 'JRELEASER_MAVENCENTRAL_TOKEN', usernameVariable: 'JRELEASER_MAVENCENTRAL_USERNAME'),
usernamePassword(credentialsId: 'ossrh.sonatype.org', passwordVariable: 'JRELEASER_NEXUS2_PASSWORD', usernameVariable: 'JRELEASER_NEXUS2_USERNAME'),
string(credentialsId: 'Hibernate-CI.github.com', variable: 'JRELEASER_GITHUB_TOKEN'),
file(credentialsId: 'release.gpg.private-key', variable: 'RELEASE_GPG_PRIVATE_KEY_PATH'),
string(credentialsId: 'release.gpg.passphrase', variable: 'JRELEASER_GPG_PASSPHRASE')]) {
sshagent(['ed25519.Hibernate-CI.github.com']) {
sh 'mvn -v'
sh 'cat $HOME/.ssh/config'
Expand Down
39 changes: 39 additions & 0 deletions jreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
project:
languages:
java:
groupId: org.hibernate.infra.develocity

release:
github:
skipTag: true
skipRelease: true
tagName: '{{projectVersion}}'

# File signing is always active
signing:
mode: COMMAND
active: RELEASE
armored: true

# Deploy JARs and POMs to Maven Central
deploy:
maven:
nexus2:
maven-central:
active: RELEASE
url: https://oss.sonatype.org/service/local
snapshotUrl: https://oss.sonatype.org/content/repositories/snapshots/
closeRepository: true
stagingRepositories:
- target/staging-deploy/maven
mavenCentral:
maven-central:
# TODO: Change to RELEASE once switching to Maven-Central:
active: NEVER
url: https://central.sonatype.com/api/v1/publisher
snapshotSupported: false
applyMavenCentralRules: true
stagingRepositories:
- target/staging-deploy/maven
# Deployment identifier used for publication.
# deploymentId: dd9991b0-18a7-41e7-b1fe-37b8ea936f85
61 changes: 6 additions & 55 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,22 +27,12 @@
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.release>17</maven.compiler.release>
<maven.compiler.parameters>true</maven.compiler.parameters>
<nexus-staging-maven-plugin.version>1.7.0</nexus-staging-maven-plugin.version>
<maven-javadoc-plugin.version>3.11.2</maven-javadoc-plugin.version>
<maven-source-plugin.version>3.3.1</maven-source-plugin.version>
<maven-shade-plugin.version>3.6.0</maven-shade-plugin.version>
<maven-gpg-plugin.version>3.2.7</maven-gpg-plugin.version>
<!-- Run mvn wrapper:wrapper when updating the wrapper plugin version -->
<maven-wrapper-plugin.version>3.3.2</maven-wrapper-plugin.version>

<gpg.sign.skip>true</gpg.sign.skip>

<!-- Repository Deployment URLs -->
<ossrh.releases.repo.id>ossrh</ossrh.releases.repo.id>
<ossrh.releases.repo.url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</ossrh.releases.repo.url>
<ossrh.releases.repo.baseUrl>https://oss.sonatype.org/</ossrh.releases.repo.baseUrl>
<ossrh.snapshots.repo.id>ossrh</ossrh.snapshots.repo.id>
<ossrh.snapshots.repo.url>https://oss.sonatype.org/content/repositories/snapshots</ossrh.snapshots.repo.url>
<maven-deploy-plugin.version>3.1.4</maven-deploy-plugin.version>
</properties>

<dependencyManagement>
Expand Down Expand Up @@ -172,22 +162,8 @@
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>${maven-gpg-plugin.version}</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
<configuration>
<skip>${gpg.sign.skip}</skip>
<homedir>${env.RELEASE_GPG_HOMEDIR}</homedir>
<bestPractices>true</bestPractices>
</configuration>
</execution>
</executions>
<artifactId>maven-deploy-plugin</artifactId>
<version>${maven-deploy-plugin.version}</version>
</plugin>
</plugins>
</build>
Expand Down Expand Up @@ -215,25 +191,12 @@
<url>http://ci.hibernate.org/</url>
</ciManagement>

<distributionManagement>
<repository>
<id>${ossrh.releases.repo.id}</id>
<name>OSSRH Releases Repository</name>
<url>${ossrh.releases.repo.url}</url>
</repository>
<snapshotRepository>
<id>${ossrh.snapshots.repo.id}</id>
<name>OSSRH Snapshots Repository</name>
<url>${ossrh.snapshots.repo.url}</url>
</snapshotRepository>
</distributionManagement>

<scm>
<url>https://github.com/hibernate/hibernate-develocity-maven-extension</url>
<connection>scm:git:[email protected]:hibernate/hibernate-develocity-maven-extension.git</connection>
<developerConnection>scm:git:[email protected]:hibernate/hibernate-develocity-maven-extension.git</developerConnection>
<tag>HEAD</tag>
</scm>
<tag>HEAD</tag>
</scm>

<issueManagement>
<system>GitHub</system>
Expand All @@ -250,22 +213,10 @@
</property>
</activation>
<properties>
<gpg.sign.skip>false</gpg.sign.skip>
<altDeploymentRepository>local::file:${maven.multiModuleProjectDirectory}/target/staging-deploy/maven</altDeploymentRepository>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>${nexus-staging-maven-plugin.version}</version>
<extensions>true</extensions>
<configuration>
<nexusUrl>${ossrh.releases.repo.baseUrl}</nexusUrl>
<serverId>${ossrh.releases.repo.id}</serverId>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
<keepStagingRepositoryOnCloseRuleFailure>true</keepStagingRepositoryOnCloseRuleFailure>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
Expand Down