diff --git a/.mvn/wrapper/maven-wrapper.jar b/.mvn/wrapper/maven-wrapper.jar new file mode 100644 index 0000000000..7967f30dd1 Binary files /dev/null and b/.mvn/wrapper/maven-wrapper.jar differ diff --git a/.mvn/wrapper/maven-wrapper.properties b/.mvn/wrapper/maven-wrapper.properties new file mode 100644 index 0000000000..f5b763a229 --- /dev/null +++ b/.mvn/wrapper/maven-wrapper.properties @@ -0,0 +1,20 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +wrapperVersion=3.3.2 +distributionType=bin +distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.7/apache-maven-3.9.7-bin.zip +wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.3.2/maven-wrapper-3.3.2.jar diff --git a/ant/pom.xml b/ant/pom.xml index 663edceae1..ae8bfa00bf 100644 --- a/ant/pom.xml +++ b/ant/pom.xml @@ -30,6 +30,11 @@ Hibernate Tools Ant Tasks jar + + + false + + org.apache.ant diff --git a/ci/release/Jenkinsfile b/ci/release/Jenkinsfile new file mode 100644 index 0000000000..3cfbdabfa7 --- /dev/null +++ b/ci/release/Jenkinsfile @@ -0,0 +1,107 @@ +/* + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2016-2024 Red Hat, Inc. + * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Library('hibernate-jenkins-pipeline-helpers') _ + +import org.hibernate.jenkins.pipeline.helpers.version.Version + +pipeline { + agent { + label 'Release' + } + tools { + maven 'Apache Maven 3.9' + jdk 'OpenJDK 11 Latest' + } + options { + buildDiscarder logRotator(daysToKeepStr: '30', numToKeepStr: '10') + disableConcurrentBuilds(abortPrevious: false) + } + parameters { + string( + name: 'RELEASE_VERSION', + defaultValue: '', + description: 'The version to be released, e.g. 6.2.33.Final.', + trim: true + ) + string( + name: 'DEVELOPMENT_VERSION', + defaultValue: '', + description: 'The next version to be used after the release, e.g. 6.2.34-SNAPSHOT.', + trim: true + ) + booleanParam( + name: 'RELEASE_DRY_RUN', + defaultValue: false, + description: 'If true, just simulate the release, without pushing any commits or tags, and without uploading any artifacts or documentation.' + ) + } + stages { + stage('Release') { + when { + beforeAgent true + // Releases must be triggered explicitly + // This is just for safety; normally the Jenkins job for this pipeline + // should be configured to "Suppress automatic SCM triggering" + // See https://stackoverflow.com/questions/58259326/prevent-jenkins-multibranch-pipeline-from-triggering-builds-for-new-branches + triggeredBy cause: "UserIdCause" + } + steps { + script { + // Check that all the necessary parameters are set + if (!params.RELEASE_VERSION) { + throw new IllegalArgumentException("Missing value for parameter RELEASE_VERSION.") + } + if (!params.DEVELOPMENT_VERSION) { + throw new IllegalArgumentException("Missing value for parameter DEVELOPMENT_VERSION.") + } + + def releaseVersion = Version.parseReleaseVersion(params.RELEASE_VERSION) + def developmentVersion = Version.parseDevelopmentVersion(params.DEVELOPMENT_VERSION) + echo "Performing full release for version ${releaseVersion.toString()}" + + withMaven(mavenSettingsConfig: params.RELEASE_DRY_RUN ? null : 'ci-hibernate.deploy.settings.maven', + 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')]) { + 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' + sh """ + bash -xe hibernate-release-scripts/release.sh ${params.RELEASE_DRY_RUN ? '-d' : ''} \ + tools ${releaseVersion.toString()} ${developmentVersion.toString()} + """ + } + } + } + } + } + } + } + } + post { + always { + notifyBuildResult notifySuccessAfterSuccess: true, maintainers: 'koen@hibernate.org' + } + } +} diff --git a/jbt/pom.xml b/jbt/pom.xml index 613f7a0457..fff6daa889 100644 --- a/jbt/pom.xml +++ b/jbt/pom.xml @@ -35,6 +35,11 @@ Hibernate Tools ORM - JBoss Tools Adapter Hibernate Tools ORM - JBoss Tools Adapter + + + false + + com.h2database diff --git a/maven/pom.xml b/maven/pom.xml index f265b1b0db..fd03332bfc 100644 --- a/maven/pom.xml +++ b/maven/pom.xml @@ -68,7 +68,8 @@ - false + + false false 3.5 diff --git a/orm/pom.xml b/orm/pom.xml index 2e1b2fdbb7..79a7e71b43 100644 --- a/orm/pom.xml +++ b/orm/pom.xml @@ -35,6 +35,11 @@ Hibernate Tools ORM Hibernate Tools ORM + + + false + + com.google.googlejavaformat diff --git a/pom.xml b/pom.xml index 4469cbed00..aa9496cd68 100644 --- a/pom.xml +++ b/pom.xml @@ -101,8 +101,30 @@ 19.3.0.0 9.2.1.jre8 + + 3.3.2 + 1.7.0 + 1.6.0 + + + true + true + + + ossrh + Sonatype OSSRH Releases + https://oss.sonatype.org/service/local/staging/deploy/maven2 + https://oss.sonatype.org + ossrh + Sonatype OSSRH Snapshots + https://oss.sonatype.org/content/repositories/snapshots + 11 11 + 3.9.7 @@ -223,36 +245,187 @@ - + - - false - - ossrh-releases-repository - Sonatype OSSRH Releases - https://oss.sonatype.org/service/local/staging/deploy/maven2/ - - - - true - - ossrh-snapshots-repository - Sonatype OSSRH Snapshots - https://oss.sonatype.org/content/repositories/snapshots/ + ${ossrh.releases.repo.id} + ${ossrh.releases.repo.name} + ${ossrh.releases.repo.url} - - - - - ossrh-releases-repository - Sonatype OSSRH Releases - https://oss.sonatype.org/service/local/staging/deploy/maven2/ - - - ossrh-snapshots-repository - Sonatype OSSRH Snapshots - https://oss.sonatype.org/content/repositories/snapshots/ - + + ${ossrh.snapshots.repo.id} + ${ossrh.snapshots.repo.name} + ${ossrh.snapshots.repo.url} + + + + + + + org.apache.maven.plugins + maven-wrapper-plugin + ${maven-wrapper-plugin.version} + + ${maven.min.version} + 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 + ${flatten-maven-plugin.version} + + ${project.build.directory} + + ossrh + + true + + + + flatten-pom + process-resources + + flatten + + + + + + + + + + org.apache.maven.plugins + maven-deploy-plugin + + ${maven-deploy-plugin.skip} + + + + + org.sonatype.plugins + nexus-staging-maven-plugin + + + default-deploy + deploy + + + deploy + + + + + + org.codehaus.mojo + flatten-maven-plugin + + + org.apache.maven.plugins + maven-enforcer-plugin + + + enforce-java-version + + enforce + + + + + + To build this project JDK ${jdk.min.version} (or greater) is required. Please install it. + ${jdk.min.version} + + + + + + + + + + + + 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 new file mode 100644 index 0000000000..eb7b745e57 --- /dev/null +++ b/reports/pom.xml @@ -0,0 +1,100 @@ + + + + 4.0.0 + + org.hibernate.tool + hibernate-tools-parent + 6.2.33-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 + + + + + + + diff --git a/utils/pom.xml b/utils/pom.xml index a74777cf90..9aaa73da0e 100644 --- a/utils/pom.xml +++ b/utils/pom.xml @@ -30,6 +30,11 @@ Hibernate Tools Common Utilities jar + + + false + + org.junit.jupiter