diff --git a/.release/.gitignore b/.release/.gitignore
new file mode 100644
index 0000000000..cdd9a17d6b
--- /dev/null
+++ b/.release/.gitignore
@@ -0,0 +1,3 @@
+# The folder into which we checkout our release scripts into
+*
+!.gitignore
\ No newline at end of file
diff --git a/ci/release/Jenkinsfile b/ci/release/Jenkinsfile
index 54302f7088..655978ba62 100644
--- a/ci/release/Jenkinsfile
+++ b/ci/release/Jenkinsfile
@@ -70,6 +70,7 @@ pipeline {
def releaseVersion = Version.parseReleaseVersion(params.RELEASE_VERSION)
def developmentVersion = Version.parseDevelopmentVersion(params.DEVELOPMENT_VERSION)
+ env.JRELEASER_DRY_RUN = params.RELEASE_DRY_RUN
echo "Performing full release for version ${releaseVersion.toString()}"
withMaven(mavenSettingsConfig: params.RELEASE_DRY_RUN ? null : 'ci-hibernate.deploy.settings.maven',
@@ -78,14 +79,21 @@ pipeline {
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'),
- usernamePassword(credentialsId: 'gradle-plugin-portal-api-key', passwordVariable: 'GRADLE_PUBLISH_SECRET', usernameVariable: 'GRADLE_PUBLISH_KEY')]) {
+ string(credentialsId: 'release.gpg.passphrase', variable: 'JRELEASER_GPG_PASSPHRASE'),
+ // 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
+ usernamePassword(credentialsId: 'ossrh.sonatype.org', passwordVariable: 'JRELEASER_NEXUS2_PASSWORD', usernameVariable: 'JRELEASER_NEXUS2_USERNAME'),
+ usernamePassword(credentialsId: 'gradle-plugin-portal-api-key', passwordVariable: 'GRADLE_PUBLISH_SECRET', usernameVariable: 'GRADLE_PUBLISH_KEY'),
+ string(credentialsId: 'Hibernate-CI.github.com', variable: 'JRELEASER_GITHUB_TOKEN')]) {
sshagent(['ed25519.Hibernate-CI.github.com', 'hibernate.filemgmt.jboss.org', 'hibernate-ci.frs.sourceforge.net']) {
sh 'cat $HOME/.ssh/config'
- sh 'git clone https://github.com/hibernate/hibernate-release-scripts.git'
- env.RELEASE_GPG_HOMEDIR = env.WORKSPACE_TMP + '/.gpg'
+ dir('.release/scripts') {
+ sh 'git clone https://github.com/hibernate/hibernate-release-scripts.git .'
+ }
sh """
- bash -xe hibernate-release-scripts/release.sh ${params.RELEASE_DRY_RUN ? '-d' : ''} \
+ bash -xe .release/scripts/release.sh -j ${params.RELEASE_DRY_RUN ? '-d' : ''} \
tools ${releaseVersion.toString()} ${developmentVersion.toString()}
"""
}
diff --git a/gradle/plugin/build.gradle b/gradle/plugin/build.gradle
index 5b9bee61c0..961fef9fd3 100644
--- a/gradle/plugin/build.gradle
+++ b/gradle/plugin/build.gradle
@@ -22,6 +22,7 @@ plugins {
}
group = 'org.hibernate.tool'
+project.description = 'Gradle plugin to provide hibernate-tools reverse engineering and code/schema generation abilities.'
java {
toolchain {
@@ -54,7 +55,7 @@ gradlePlugin {
id = 'org.hibernate.tool.hibernate-tools-gradle'
implementationClass = 'org.hibernate.tool.gradle.Plugin'
displayName = 'Hibernate Tools Gradle Plugin'
- description = 'Gradle plugin to provide hibernate-tools reverse engineering and code/schema generation abilities.'
+ description = project.description
tags = ['hibernate','tools','reverse engineering','reveng','generation']
}
}
@@ -83,3 +84,68 @@ tasks.named('check') {
tasks.named('test') {
useJUnitPlatform()
}
+
+publishing {
+ publications {
+ pluginMaven(MavenPublication) {
+ pom {
+ name = project.name
+ groupId = 'org.hibernate.tool'
+ artifactId = project.name
+ version = project.version
+
+ description = project.description
+ url = 'https://hibernate.org/tools'
+
+ organization {
+ name = 'Hibernate.org'
+ url = 'https://hibernate.org'
+ }
+
+ licenses {
+ license {
+ name = 'Apache License, version 2.0'
+ url = 'https://www.apache.org/licenses/LICENSE-2.0'
+ }
+ }
+
+ scm {
+ url = 'https://github.com/hibernate/hibernate-tools'
+ connection = 'scm:git:https://github.com/hibernate/hibernate-tools.git'
+ developerConnection = 'scm:git:git@github.com:hibernate/hibernate-tools.git'
+ }
+
+ developers {
+ developer {
+ id = 'maxandersen'
+ name = 'Max Andersen'
+ email = 'max@hibernate.org'
+ url = 'https://in.relation.to/Bloggers/Max'
+ }
+ developer {
+ id = 'koentsje'
+ name = 'Koen Aers'
+ email = 'koen@hibernate.org'
+ url = 'https://koentsje.blogspot.be'
+ }
+ }
+
+ issueManagement {
+ system = 'jira'
+ url = 'https://hibernate.atlassian.net/browse/HBX'
+ }
+ }
+ }
+ }
+ repositories {
+ maven {
+ name = "staging"
+ var mavenPath = findProperty("mavenStagingDirectory")
+ if (mavenPath == null) {
+ url = rootProject.layout.buildDirectory.dir("staging-deploy${File.separator}maven")
+ } else {
+ url = URI.create(mavenPath).toURL()
+ }
+ }
+ }
+}
diff --git a/gradle/pom.xml b/gradle/pom.xml
index fabfbfe4bf..9abab9a5ec 100644
--- a/gradle/pom.xml
+++ b/gradle/pom.xml
@@ -53,6 +53,14 @@
+
+
+ org.apache.maven.plugins
+ maven-deploy-plugin
+
+ true
+
+
org.codehaus.mojo
@@ -76,28 +84,6 @@
-
-
- org.codehaus.mojo
- build-helper-maven-plugin
-
-
- attach-artifacts
- package
-
- attach-artifact
-
-
-
-
- ${project.basedir}/plugin/build/libs/${project.artifactId}-${project.version}.jar
- jar
-
-
-
-
-
-
@@ -123,8 +109,10 @@
${gradle.executable}
publishPlugins
+ publishPluginMavenPublicationToStagingRepository
-Pversion=${project.version}
-Dmaven.repo.local=${settings.localRepository}
+ -PmavenStagingDirectory=${local.staging.releases.repo.url}
diff --git a/pom.xml b/pom.xml
index 8e2fde93f1..eeec3ce5e8 100644
--- a/pom.xml
+++ b/pom.xml
@@ -105,7 +105,6 @@
3.3.2
- 1.7.0
1.7.0
true
- true
- ossrh
- Sonatype OSSRH Releases
- https://oss.sonatype.org/service/local/staging/deploy/maven2
- https://oss.sonatype.org
+
+
+ staging-deploy
+ Local Staging Directory Releases Repository
+ file:${maven.multiModuleProjectDirectory}/target/staging-deploy/maven
ossrh
Sonatype OSSRH Snapshots
https://oss.sonatype.org/content/repositories/snapshots
@@ -253,9 +252,9 @@
- ${ossrh.releases.repo.id}
- ${ossrh.releases.repo.name}
- ${ossrh.releases.repo.url}
+ ${local.staging.releases.repo.id}
+ ${local.staging.releases.repo.name}
+ ${local.staging.releases.repo.url}
${ossrh.snapshots.repo.id}
@@ -276,39 +275,6 @@
bin
-
-
- org.apache.maven.plugins
- maven-gpg-plugin
-
-
- sign-artifacts
- verify
-
- sign
-
-
- ${deploy.skip}
- ${env.RELEASE_GPG_HOMEDIR}
-
-
-
-
-
- org.sonatype.plugins
- nexus-staging-maven-plugin
- ${nexus-staging.plugin.version}
- false
-
- ${deploy.skip}
- ${ossrh.releases.repo.id}
-
- ${ossrh.releases.repo.baseUrl}
-
- 60
-
-
org.codehaus.mojo
flatten-maven-plugin
@@ -339,30 +305,9 @@
org.apache.maven.plugins
maven-deploy-plugin
- ${maven-deploy-plugin.skip}
+ ${deploy.skip}
-
-
- org.sonatype.plugins
- nexus-staging-maven-plugin
-
-
- default-deploy
- deploy
-
-
- deploy
-
-
-
-
org.codehaus.mojo
flatten-maven-plugin
@@ -392,44 +337,4 @@
-
-
-
- release
-
-
- performRelease
- true
-
-
-
-
-
- org.apache.maven.plugins
- maven-gpg-plugin
-
-
-
-
-
-
-
- build-reports-as-last-module
-
-
- !some.property.that.will.never.exist
-
-
-
- reports
-
-
-
-
-
diff --git a/reports/pom.xml b/reports/pom.xml
deleted file mode 100644
index bb4929c224..0000000000
--- a/reports/pom.xml
+++ /dev/null
@@ -1,100 +0,0 @@
-
-
-
- 4.0.0
-
- org.hibernate.tool
- hibernate-tools-parent
- 7.0.0-SNAPSHOT
-
- hibernate-tools-reports
-
- Hibernate Tools Reports
- Hibernate Tools build reports
- pom
-
-
-
- org.hibernate.tool
- hibernate-tools-utils
- ${project.version}
-
-
- org.hibernate.tool
- hibernate-tools-orm
- ${project.version}
-
-
- org.hibernate.tool
- hibernate-tools-orm-jbt
- ${project.version}
-
-
- org.hibernate.tool
- hibernate-tools-maven
- ${project.version}
-
-
- org.hibernate.tool
- hibernate-tools-gradle
- ${project.version}
-
-
- org.hibernate.tool
- hibernate-tools-ant
- ${project.version}
-
-
-
-
-
-
-
- org.sonatype.plugins
- nexus-staging-maven-plugin
- false
-
-
-
-
- default-deploy
- none
-
-
-
- deferred-deploy
- deploy
-
- deploy-staged
-
-
-
-
-
-
-