From ba2610d72e6a588ad2832722859c098818c3e371 Mon Sep 17 00:00:00 2001 From: Davide D'Alto Date: Wed, 14 Apr 2021 13:54:45 +0100 Subject: [PATCH 1/2] Add tag to commit message when uploading docs on the website --- release/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release/build.gradle b/release/build.gradle index a188674c9..daeb49a54 100644 --- a/release/build.gradle +++ b/release/build.gradle @@ -90,7 +90,7 @@ gitPublish { } // message used when committing changes - commitMessage = "Hibernate Reactive documentation for ${projectVersion}" + commitMessage = "[HREACTIVE] Hibernate Reactive documentation for ${projectVersion}" } gitPublishCopy.dependsOn assembleDocumentation From 5e3149b56639c5ef303e8d45895eeff5a2b2de4c Mon Sep 17 00:00:00 2001 From: Davide D'Alto Date: Wed, 14 Apr 2021 14:29:40 +0100 Subject: [PATCH 2/2] [#704] Update release to JBoss Nexus This is only for SNAPSHOTS and it now uses the gradle-nexus-plugin. --- .github/workflows/build.yml | 2 +- build.gradle | 22 ++++++++++++++++++++++ publish.gradle | 30 ------------------------------ 3 files changed, 23 insertions(+), 31 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3adf68e86..ed26763fe 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -192,7 +192,7 @@ jobs: ORG_GRADLE_PROJECT_jbossNexusUser: ${{ secrets.JBOSS_NEXUS_USER }} ORG_GRADLE_PROJECT_jbossNexusPassword: ${{ secrets.JBOSS_NEXUS_PASSWORD }} if: endsWith( steps.detect-version.outputs.version, '-SNAPSHOT' ) && env.ORG_GRADLE_PROJECT_jbossNexusUser - run: ./gradlew publish + run: ./gradlew publishToJBossNexus closeAndReleaseJBossNexusStagingRepository release: name: Release diff --git a/build.gradle b/build.gradle index 7ba8bc368..ebb8a33ee 100644 --- a/build.gradle +++ b/build.gradle @@ -10,6 +10,16 @@ plugins { } ext { + // Credentials can be specified on the command-line using project properties, + // or stored locally using the gradle-credentials-plugin. + // See below for the name of project properties. + // See https://github.com/etiennestuder/gradle-credentials-plugin to store credentials locally. + if (!project.hasProperty('jbossNexusUser')) { + jbossNexusUser = credentials.jbossNexusUser + } + if (!project.hasProperty('jbossNexusPassword')) { + jbossNexusPassword = credentials.jbossNexusPassword + } if (!project.hasProperty('sonatypeOssrhUser')) { sonatypeOssrhUser = credentials.sonatypeOssrhUser } @@ -79,12 +89,24 @@ ext { logger.lifecycle "Hibernate Reactive: " + project.version } +// To release, see task ciRelease in release/build.gradle + +// To publish snapshots: +// ./gradlew publishToJBossNexus closeAndReleaseJBossNexusStagingRepository -PjbossNexusUser="" -PjbossNexusPassword="" + +// To publish on Sonatype (Maven Central): +// ./gradlew publishToSonatype closeAndReleaseStagingRepository -PsonatypeOssrhUser="" -PsonatypeOssrhPassword="" nexusPublishing { repositories { sonatype { username = project.sonatypeOssrhUser password = project.sonatypeOssrhPassword } + jBossNexus { + snapshotRepositoryUrl = uri('https://repository.jboss.org/nexus/content/repositories/snapshots') + username = project.jbossNexusUser + password = project.jbossNexusPassword + } } } diff --git a/publish.gradle b/publish.gradle index d9d22c9b2..671fada2b 100644 --- a/publish.gradle +++ b/publish.gradle @@ -1,25 +1,6 @@ apply plugin: 'maven-publish' apply plugin: 'nu.studer.credentials' -// To publish snapshots: -// ./gradlew publish -PjbossNexusUser="" -PjbossNexusPassword="" -// To release, see task ciRelease in release/build.gradle -// To publish on Sonatype (Maven Central): -// ./gradlew publishToSonatype closeAndReleaseStagingRepository -PsonatypeOssrhUser="" -PsonatypeOssrhPassword="" - -ext { - // Credentials can be specified on the command-line using project properties, - // or stored locally using the gradle-credentials-plugin. - // See below for the name of project properties. - // See https://github.com/etiennestuder/gradle-credentials-plugin to store credentials locally. - if (!project.hasProperty('jbossNexusUser')) { - jbossNexusUser = credentials.jbossNexusUser - } - if (!project.hasProperty('jbossNexusPassword')) { - jbossNexusPassword = credentials.jbossNexusPassword - } -} - task sourcesJar(type: Jar) { from sourceSets.main.allJava archiveClassifier = 'sources' @@ -54,17 +35,6 @@ javadoc { } publishing { - repositories { -// mavenLocal() - maven { - name 'jboss-snapshots-repository' - url 'https://repository.jboss.org/nexus/content/repositories/snapshots' - credentials { - username project.jbossNexusUser - password project.jbossNexusPassword - } - } - } publications { logger.lifecycle "Publishing groupId: '" + project.group + "', version: '" + project.version + "'"