HHH-18912 - ORM release process
https://hibernate.atlassian.net/browse/HHH-18912
This commit is contained in:
parent
e006427920
commit
5d799730a1
|
@ -75,7 +75,10 @@ configurations {
|
||||||
}
|
}
|
||||||
|
|
||||||
javadocSources {
|
javadocSources {
|
||||||
description = 'Source files to be built by the javadoc tool'
|
description = 'All Java sources for the aggregated Javadocs'
|
||||||
|
canBeConsumed = false
|
||||||
|
canBeResolved = true
|
||||||
|
visible = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -145,6 +148,7 @@ dependencies {
|
||||||
testing project( ':hibernate-testing' )
|
testing project( ':hibernate-testing' )
|
||||||
|
|
||||||
spatial project( ':hibernate-spatial' )
|
spatial project( ':hibernate-spatial' )
|
||||||
|
javadocSources project( path: ':hibernate-spatial', configuration: 'javadocSources' )
|
||||||
|
|
||||||
agroal project( ':hibernate-agroal' )
|
agroal project( ':hibernate-agroal' )
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,19 @@
|
||||||
|
/*
|
||||||
|
* SPDX-License-Identifier: LGPL-2.1-or-later
|
||||||
|
* Copyright Red Hat Inc. and Hibernate Authors
|
||||||
|
*/
|
||||||
|
var publishingExtension = project.getExtensions().getByType(PublishingExtension) as PublishingExtension
|
||||||
|
publishingExtension.publications.create("groupRelocation", MavenPublication) {
|
||||||
|
pom {
|
||||||
|
name = project.name + ' (relocated)'
|
||||||
|
groupId = 'org.hibernate'
|
||||||
|
|
||||||
|
distributionManagement {
|
||||||
|
relocation {
|
||||||
|
groupId = project.group
|
||||||
|
artifactId = project.name
|
||||||
|
version = project.version
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -18,7 +18,7 @@ buildscript {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
import de.thetaphi.forbiddenapis.gradle.CheckForbiddenApis
|
|
||||||
import org.apache.tools.ant.filters.ReplaceTokens
|
import org.apache.tools.ant.filters.ReplaceTokens
|
||||||
|
|
||||||
apply plugin: 'java-library'
|
apply plugin: 'java-library'
|
||||||
|
@ -159,21 +159,6 @@ dependencies {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
configurations {
|
|
||||||
javadocSources {
|
|
||||||
canBeConsumed = true
|
|
||||||
canBeResolved = false
|
|
||||||
visible = false
|
|
||||||
description = 'Configuration for accessing the sources that should be included in the javadoc for the project'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
artifacts {
|
|
||||||
sourceSets.main.allJava.srcDirs.each { srcDir ->
|
|
||||||
javadocSources srcDir
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
// Compilation
|
// Compilation
|
||||||
|
|
||||||
|
|
|
@ -58,7 +58,7 @@ tasks.named( "javadoc", Javadoc ) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
task javadocJar(type: Jar) {
|
tasks.register("javadocJar", Jar) {
|
||||||
from project.tasks.javadoc.outputs
|
from project.tasks.javadoc.outputs
|
||||||
manifest {
|
manifest {
|
||||||
attributes(
|
attributes(
|
||||||
|
|
|
@ -5,18 +5,20 @@
|
||||||
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html
|
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html
|
||||||
*/
|
*/
|
||||||
|
|
||||||
apply from: rootProject.file( 'gradle/releasable.gradle' )
|
|
||||||
apply from: rootProject.file( 'gradle/java-module.gradle' )
|
apply from: rootProject.file( 'gradle/java-module.gradle' )
|
||||||
apply from: rootProject.file( 'gradle/publishing-pom.gradle' )
|
apply from: rootProject.file( 'gradle/publishing.gradle' )
|
||||||
|
|
||||||
apply plugin: 'signing'
|
tasks.register("publishReleaseArtifacts") {
|
||||||
|
// mirror for `:release:publishReleaseArtifacts`
|
||||||
// Make sure that the publishReleaseArtifacts task of the release module runs the release task of this sub module
|
dependsOn tasks.release
|
||||||
tasks.getByPath( ':release:publishReleaseArtifacts' ).dependsOn tasks.release
|
}
|
||||||
|
|
||||||
configurations {
|
configurations {
|
||||||
javadocSources {
|
javadocSources {
|
||||||
description 'Used to aggregate javadocs for the whole project'
|
description = "All Java sources for the project's Javadoc"
|
||||||
|
canBeConsumed = true
|
||||||
|
canBeResolved = false
|
||||||
|
visible = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -36,66 +38,12 @@ java {
|
||||||
// Publishing
|
// Publishing
|
||||||
|
|
||||||
var publishingExtension = project.getExtensions().getByType(PublishingExtension) as PublishingExtension
|
var publishingExtension = project.getExtensions().getByType(PublishingExtension) as PublishingExtension
|
||||||
publishingExtension.publications {
|
publishingExtension.publications.named("publishedArtifacts", MavenPublication) {
|
||||||
// main publication
|
// Add the Java component to the main publication
|
||||||
publishedArtifacts {
|
from components.java
|
||||||
// Add the Java component to the main publication
|
|
||||||
from components.java
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
// Signing
|
|
||||||
|
|
||||||
def signingKey = resolveSigningKey()
|
|
||||||
def signingPassphrase = resolveSigningPassphrase()
|
|
||||||
|
|
||||||
var signingExtension = project.getExtensions().getByType(SigningExtension) as SigningExtension
|
|
||||||
signingExtension.sign publishingExtension.publications.publishedArtifacts
|
|
||||||
signingExtension.useInMemoryPgpKeys(signingKey, signingPassphrase)
|
|
||||||
|
|
||||||
gradle.taskGraph.whenReady { TaskExecutionGraph graph ->
|
|
||||||
boolean wasPublishingRequested = false
|
|
||||||
|
|
||||||
graph.allTasks.each {task ->
|
|
||||||
if ( task instanceof PublishToMavenRepository ) {
|
|
||||||
wasPublishingRequested = true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( wasPublishingRequested ) {
|
|
||||||
def ossrhUser = System.getenv().get( "ORG_GRADLE_PROJECT_sonatypeUsername" )
|
|
||||||
def ossrhPass = System.getenv().get( "ORG_GRADLE_PROJECT_sonatypePassword" )
|
|
||||||
if ( ossrhUser == null || ossrhPass == null ) {
|
|
||||||
throw new RuntimeException( "Cannot perform publishing to OSSRH without credentials." )
|
|
||||||
}
|
|
||||||
logger.lifecycle "Publishing {} : {} : {}", project.group, project.name, project.version
|
|
||||||
signingExtension.required = true
|
|
||||||
}
|
|
||||||
else if ( signingKey == null || signingPassphrase == null ) {
|
|
||||||
tasks.withType( Sign ).each { t-> t.enabled = false }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static String resolveSigningKey() {
|
|
||||||
var key = System.getenv().get( "SIGNING_GPG_PRIVATE_KEY" )
|
|
||||||
if ( key != null ) {
|
|
||||||
return key
|
|
||||||
}
|
|
||||||
|
|
||||||
var keyFile = System.getenv().get( "SIGNING_GPG_PRIVATE_KEY_PATH" )
|
|
||||||
if ( keyFile != null ) {
|
|
||||||
return new File( keyFile ).text
|
|
||||||
}
|
|
||||||
|
|
||||||
return null
|
|
||||||
}
|
|
||||||
|
|
||||||
static String resolveSigningPassphrase() {
|
|
||||||
return System.getenv().get( "SIGNING_GPG_PASSPHRASE" )
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
// Release / publishing tasks
|
// Release / publishing tasks
|
||||||
|
@ -112,17 +60,3 @@ tasks.preVerifyRelease.dependsOn generatePomFileForPublishedArtifactsPublication
|
||||||
|
|
||||||
tasks.publishToSonatype.mustRunAfter test
|
tasks.publishToSonatype.mustRunAfter test
|
||||||
|
|
||||||
|
|
||||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
// Ancillary tasks
|
|
||||||
|
|
||||||
tasks.register('showPublications') {
|
|
||||||
doFirst {
|
|
||||||
project.publishing.publications.each { publication ->
|
|
||||||
println "Publication (${publication.name}): ${publication.groupId}:${publication.artifactId}:${publication.version}"
|
|
||||||
publication.artifacts.each { artifact ->
|
|
||||||
println " > ${artifact}"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,63 +0,0 @@
|
||||||
/*
|
|
||||||
* Hibernate, Relational Persistence for Idiomatic Java
|
|
||||||
*
|
|
||||||
* License: GNU Lesser General Public License (LGPL), version 2.1 or later
|
|
||||||
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html
|
|
||||||
*/
|
|
||||||
|
|
||||||
apply plugin: 'maven-publish'
|
|
||||||
|
|
||||||
// Disable Gradle module metadata publishing until we know what we want.
|
|
||||||
// https://docs.gradle.org/6.0.1/userguide/publishing_gradle_module_metadata.html#sub:disabling-gmm-publication
|
|
||||||
tasks.withType(GenerateModuleMetadata) {
|
|
||||||
enabled = false
|
|
||||||
}
|
|
||||||
|
|
||||||
publishing {
|
|
||||||
publications {
|
|
||||||
publishedArtifacts( MavenPublication ) {
|
|
||||||
pom {
|
|
||||||
name = 'Hibernate ORM - ' + project.name
|
|
||||||
description = project.description
|
|
||||||
url = 'https://hibernate.org/orm'
|
|
||||||
|
|
||||||
organization {
|
|
||||||
name = 'Hibernate.org'
|
|
||||||
url = 'https://hibernate.org'
|
|
||||||
}
|
|
||||||
|
|
||||||
licenses {
|
|
||||||
license {
|
|
||||||
name = 'GNU Library General Public License v2.1 or later'
|
|
||||||
url = 'https://www.opensource.org/licenses/LGPL-2.1'
|
|
||||||
comments = 'See discussion at https://hibernate.org/community/license/ for more details.'
|
|
||||||
distribution = 'repo'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
scm {
|
|
||||||
url = 'https://github.com/hibernate/hibernate-orm'
|
|
||||||
connection = 'scm:git:https://github.com/hibernate/hibernate-orm.git'
|
|
||||||
developerConnection = 'scm:git:git@github.com:hibernate/hibernate-orm.git'
|
|
||||||
}
|
|
||||||
|
|
||||||
issueManagement {
|
|
||||||
system = 'jira'
|
|
||||||
url = 'https://hibernate.atlassian.net/browse/HHH'
|
|
||||||
}
|
|
||||||
|
|
||||||
developers {
|
|
||||||
developer {
|
|
||||||
id = 'hibernate-team'
|
|
||||||
name = 'The Hibernate Development Team'
|
|
||||||
organization = 'Hibernate.org'
|
|
||||||
organizationUrl = 'https://hibernate.org'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -0,0 +1,173 @@
|
||||||
|
/*
|
||||||
|
* SPDX-License-Identifier: LGPL-2.1-or-later
|
||||||
|
* Copyright Red Hat Inc. and Hibernate Authors
|
||||||
|
*/
|
||||||
|
apply plugin: 'maven-publish'
|
||||||
|
apply plugin: 'signing'
|
||||||
|
|
||||||
|
apply from: rootProject.file( 'gradle/releasable.gradle' )
|
||||||
|
|
||||||
|
// Disable Gradle module metadata publishing until we know what we want.
|
||||||
|
// https://docs.gradle.org/6.0.1/userguide/publishing_gradle_module_metadata.html#sub:disabling-gmm-publication
|
||||||
|
tasks.withType(GenerateModuleMetadata).configureEach {
|
||||||
|
enabled = false
|
||||||
|
}
|
||||||
|
|
||||||
|
var publishingExtension = project.getExtensions().getByType(PublishingExtension) as PublishingExtension
|
||||||
|
|
||||||
|
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
// Apply standard POM information for all publications
|
||||||
|
|
||||||
|
publishingExtension.publications.configureEach {
|
||||||
|
pom {
|
||||||
|
url = 'https://hibernate.org/orm'
|
||||||
|
|
||||||
|
organization {
|
||||||
|
name = 'Hibernate.org'
|
||||||
|
url = 'https://hibernate.org'
|
||||||
|
}
|
||||||
|
|
||||||
|
licenses {
|
||||||
|
license {
|
||||||
|
name = 'GNU Library General Public License v2.1 or later'
|
||||||
|
url = 'https://www.opensource.org/licenses/LGPL-2.1'
|
||||||
|
comments = 'See discussion at https://hibernate.org/community/license/ for more details.'
|
||||||
|
distribution = 'repo'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
scm {
|
||||||
|
url = 'https://github.com/hibernate/hibernate-orm'
|
||||||
|
connection = 'scm:git:https://github.com/hibernate/hibernate-orm.git'
|
||||||
|
developerConnection = 'scm:git:git@github.com:hibernate/hibernate-orm.git'
|
||||||
|
}
|
||||||
|
|
||||||
|
issueManagement {
|
||||||
|
system = 'jira'
|
||||||
|
url = 'https://hibernate.atlassian.net/browse/HHH'
|
||||||
|
}
|
||||||
|
|
||||||
|
developers {
|
||||||
|
developer {
|
||||||
|
id = 'hibernate-team'
|
||||||
|
name = 'The Hibernate Development Team'
|
||||||
|
organization = 'Hibernate.org'
|
||||||
|
organizationUrl = 'https://hibernate.org'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
// register the "main" publication named `publishedArtifacts`
|
||||||
|
|
||||||
|
publishingExtension.publications.create("publishedArtifacts", MavenPublication) {
|
||||||
|
pom {
|
||||||
|
name = 'Hibernate ORM - ' + project.name
|
||||||
|
description = project.description
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
// Create a special local repository used for local testing of PublishToMavenRepository
|
||||||
|
|
||||||
|
if ( project.hasProperty("local_pub_repo") ) {
|
||||||
|
// used for
|
||||||
|
publishingExtension.repositories {
|
||||||
|
maven {
|
||||||
|
name = "localRepo"
|
||||||
|
url = rootProject.layout.buildDirectory.dir("maven-repo").get().asFile.toURI()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
// Signing
|
||||||
|
|
||||||
|
def signingKey = resolveSigningKey()
|
||||||
|
def signingPassphrase = resolveSigningPassphrase()
|
||||||
|
|
||||||
|
var signingExtension = project.getExtensions().getByType(SigningExtension) as SigningExtension
|
||||||
|
signingExtension.sign publishingExtension.publications.publishedArtifacts
|
||||||
|
signingExtension.useInMemoryPgpKeys(signingKey, signingPassphrase)
|
||||||
|
|
||||||
|
gradle.taskGraph.whenReady { TaskExecutionGraph graph ->
|
||||||
|
// are we publishing to OSSRH?
|
||||||
|
boolean wasPublishingRequested = false
|
||||||
|
|
||||||
|
graph.allTasks.each {task ->
|
||||||
|
if ( task instanceof PublishToMavenRepository ) {
|
||||||
|
if ( "sonatype" == task.repository.name ) {
|
||||||
|
wasPublishingRequested = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( wasPublishingRequested ) {
|
||||||
|
def ossrhUser = System.getenv().get( "ORG_GRADLE_PROJECT_sonatypeUsername" )
|
||||||
|
def ossrhPass = System.getenv().get( "ORG_GRADLE_PROJECT_sonatypePassword" )
|
||||||
|
if ( ossrhUser == null || ossrhPass == null ) {
|
||||||
|
throw new RuntimeException( "Cannot perform publishing to OSSRH without credentials." )
|
||||||
|
}
|
||||||
|
logger.lifecycle "Publishing {} : {} : {}", project.group, project.name, project.version
|
||||||
|
signingExtension.required = true
|
||||||
|
}
|
||||||
|
else if ( signingKey == null || signingPassphrase == null ) {
|
||||||
|
tasks.withType( Sign ).each { t-> t.enabled = false }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static String resolveSigningKey() {
|
||||||
|
var key = System.getenv().get( "SIGNING_GPG_PRIVATE_KEY" )
|
||||||
|
if ( key != null ) {
|
||||||
|
return key
|
||||||
|
}
|
||||||
|
|
||||||
|
var keyFile = System.getenv().get( "SIGNING_GPG_PRIVATE_KEY_PATH" )
|
||||||
|
if ( keyFile != null ) {
|
||||||
|
return new File( keyFile ).text
|
||||||
|
}
|
||||||
|
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
|
||||||
|
static String resolveSigningPassphrase() {
|
||||||
|
return System.getenv().get( "SIGNING_GPG_PASSPHRASE" )
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
// Ancillary tasks
|
||||||
|
|
||||||
|
tasks.register('showPublications') {
|
||||||
|
doFirst {
|
||||||
|
project.publishing.publications.each { publication ->
|
||||||
|
println "Publication (${publication.name}): ${publication.groupId}:${publication.artifactId}:${publication.version}"
|
||||||
|
publication.artifacts.each { artifact ->
|
||||||
|
println " > ${artifact}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.withType(PublishToMavenLocal).configureEach {
|
||||||
|
doFirst {
|
||||||
|
logger.lifecycle("PublishToMavenLocal ({})", publication.name)
|
||||||
|
logger.lifecycle(" - {} : {} : {} ", publication.groupId, publication.artifactId, publication.pom.packaging)
|
||||||
|
logger.lifecycle(" - artifacts ({})...", publication.artifacts.size())
|
||||||
|
publication.artifacts.forEach {
|
||||||
|
logger.lifecycle(" - artifact ({}) : {} ({})" , it.classifier, it.file, it.file.size())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.withType(PublishToMavenRepository).configureEach {
|
||||||
|
doFirst {
|
||||||
|
logger.lifecycle("PublishToMavenRepository ({} : {})", publication.name, repository.name)
|
||||||
|
logger.lifecycle(" - {} : {} : {} ", publication.groupId, publication.artifactId, publication.pom.packaging)
|
||||||
|
logger.lifecycle(" - artifacts ({})...", publication.artifacts.size())
|
||||||
|
publication.artifacts.forEach {
|
||||||
|
logger.lifecycle(" - artifact ({}) : {} ({})" , it.classifier, it.file, it.file.size())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,10 +1,10 @@
|
||||||
apply from: rootProject.file( 'gradle/base-information.gradle' )
|
apply from: rootProject.file( 'gradle/base-information.gradle' )
|
||||||
|
|
||||||
task release {
|
tasks.register('release') {
|
||||||
mustRunAfter ':release:releaseChecks'
|
mustRunAfter ':release:releaseChecks'
|
||||||
enabled !project.ormVersion.isSnapshot
|
enabled !project.ormVersion.isSnapshot
|
||||||
}
|
}
|
||||||
|
|
||||||
task preVerifyRelease {
|
tasks.register('preVerifyRelease') {
|
||||||
dependsOn ':release:preVerifyRelease'
|
dependsOn ':release:preVerifyRelease'
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,8 @@
|
||||||
|
|
||||||
description = 'Integration for Agroal as a ConnectionProvider for Hibernate ORM'
|
description = 'Integration for Agroal as a ConnectionProvider for Hibernate ORM'
|
||||||
|
|
||||||
apply from: rootProject.file( 'gradle/relocated-published-java-module.gradle' )
|
apply from: rootProject.file( 'gradle/published-java-module.gradle' )
|
||||||
|
apply from: rootProject.file( 'gradle/group-relocation.gradle' )
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation project( ':hibernate-core' )
|
implementation project( ':hibernate-core' )
|
||||||
|
|
|
@ -7,7 +7,8 @@
|
||||||
|
|
||||||
description = 'Integration for c3p0 Connection pooling into Hibernate ORM'
|
description = 'Integration for c3p0 Connection pooling into Hibernate ORM'
|
||||||
|
|
||||||
apply from: rootProject.file( 'gradle/relocated-published-java-module.gradle' )
|
apply from: rootProject.file( 'gradle/published-java-module.gradle' )
|
||||||
|
apply from: rootProject.file( 'gradle/group-relocation.gradle' )
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation project( ':hibernate-core' )
|
implementation project( ':hibernate-core' )
|
||||||
|
|
|
@ -7,7 +7,8 @@
|
||||||
|
|
||||||
description = 'Hibernate\'s community supported dialects'
|
description = 'Hibernate\'s community supported dialects'
|
||||||
|
|
||||||
apply from: rootProject.file( 'gradle/relocated-published-java-module.gradle' )
|
apply from: rootProject.file( 'gradle/published-java-module.gradle' )
|
||||||
|
apply from: rootProject.file( 'gradle/group-relocation.gradle' )
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
api project( ':hibernate-core' )
|
api project( ':hibernate-core' )
|
||||||
|
|
|
@ -12,7 +12,9 @@ plugins {
|
||||||
|
|
||||||
description = 'Hibernate\'s core ORM functionality'
|
description = 'Hibernate\'s core ORM functionality'
|
||||||
|
|
||||||
apply from: rootProject.file( 'gradle/relocated-published-java-module.gradle' )
|
apply from: rootProject.file( 'gradle/published-java-module.gradle' )
|
||||||
|
apply from: rootProject.file( 'gradle/group-relocation.gradle' )
|
||||||
|
|
||||||
apply plugin: 'org.hibernate.orm.antlr'
|
apply plugin: 'org.hibernate.orm.antlr'
|
||||||
apply plugin: 'org.hibernate.matrix-test'
|
apply plugin: 'org.hibernate.matrix-test'
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,9 @@
|
||||||
|
|
||||||
description = 'Hibernate\'s entity version (audit/history) support'
|
description = 'Hibernate\'s entity version (audit/history) support'
|
||||||
|
|
||||||
apply from: rootProject.file( 'gradle/relocated-published-java-module.gradle' )
|
apply from: rootProject.file( 'gradle/published-java-module.gradle' )
|
||||||
|
apply from: rootProject.file( 'gradle/group-relocation.gradle' )
|
||||||
|
|
||||||
apply plugin: 'org.hibernate.matrix-test'
|
apply plugin: 'org.hibernate.matrix-test'
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
|
|
@ -7,7 +7,8 @@
|
||||||
|
|
||||||
description = "Experimental extension to make it easier to compile applications into a GraalVM native image"
|
description = "Experimental extension to make it easier to compile applications into a GraalVM native image"
|
||||||
|
|
||||||
apply from: rootProject.file( 'gradle/relocated-published-java-module.gradle' )
|
apply from: rootProject.file( 'gradle/published-java-module.gradle' )
|
||||||
|
apply from: rootProject.file( 'gradle/group-relocation.gradle' )
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
//No need for transitive dependencies: this is all just metadata to be used as companion jar.
|
//No need for transitive dependencies: this is all just metadata to be used as companion jar.
|
||||||
|
|
|
@ -7,7 +7,8 @@
|
||||||
|
|
||||||
description = 'Integration for HikariCP into Hibernate O/RM'
|
description = 'Integration for HikariCP into Hibernate O/RM'
|
||||||
|
|
||||||
apply from: rootProject.file( 'gradle/relocated-published-java-module.gradle' )
|
apply from: rootProject.file( 'gradle/published-java-module.gradle' )
|
||||||
|
apply from: rootProject.file( 'gradle/group-relocation.gradle' )
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation project( ':hibernate-core' )
|
implementation project( ':hibernate-core' )
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
description = 'Integration for javax.cache into Hibernate as a second-level caching service'
|
description = 'Integration for javax.cache into Hibernate as a second-level caching service'
|
||||||
|
|
||||||
apply from: rootProject.file( 'gradle/relocated-published-java-module.gradle' )
|
apply from: rootProject.file( 'gradle/published-java-module.gradle' )
|
||||||
|
apply from: rootProject.file( 'gradle/group-relocation.gradle' )
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
api project( ':hibernate-core' )
|
api project( ':hibernate-core' )
|
||||||
|
|
|
@ -7,7 +7,8 @@
|
||||||
|
|
||||||
description = 'Integration for JDK JFR into Hibernate O/RM'
|
description = 'Integration for JDK JFR into Hibernate O/RM'
|
||||||
|
|
||||||
apply from: rootProject.file( 'gradle/relocated-published-java-module.gradle' )
|
apply from: rootProject.file( 'gradle/published-java-module.gradle' )
|
||||||
|
apply from: rootProject.file( 'gradle/group-relocation.gradle' )
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation project( ':hibernate-core' )
|
implementation project( ':hibernate-core' )
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
description = 'Integration for Micrometer metrics into Hibernate as a metrics collection package'
|
description = 'Integration for Micrometer metrics into Hibernate as a metrics collection package'
|
||||||
|
|
||||||
apply from: rootProject.file( 'gradle/relocated-published-java-module.gradle' )
|
apply from: rootProject.file( 'gradle/published-java-module.gradle' )
|
||||||
|
apply from: rootProject.file( 'gradle/group-relocation.gradle' )
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation project( ':hibernate-core' )
|
implementation project( ':hibernate-core' )
|
||||||
|
|
|
@ -2,13 +2,10 @@ plugins {
|
||||||
id 'java-platform'
|
id 'java-platform'
|
||||||
}
|
}
|
||||||
|
|
||||||
description = 'Gradle platform for Hibernate ORM'
|
description = 'Platform (BOM) for Hibernate ORM dependencies'
|
||||||
|
|
||||||
apply from: rootProject.file( 'gradle/releasable.gradle' )
|
|
||||||
apply from: rootProject.file( "gradle/base-information.gradle" )
|
apply from: rootProject.file( "gradle/base-information.gradle" )
|
||||||
apply from: rootProject.file( "gradle/publishing-pom.gradle" )
|
apply from: rootProject.file( "gradle/publishing.gradle" )
|
||||||
|
|
||||||
apply plugin: 'signing'
|
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
constraints {
|
constraints {
|
||||||
|
@ -65,15 +62,13 @@ dependencies {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
publishing {
|
var publishingExtension = project.getExtensions().getByType(PublishingExtension) as PublishingExtension
|
||||||
publications {
|
publishingExtension.publications.named("publishedArtifacts", MavenPublication) {
|
||||||
publishedArtifacts {
|
from components.javaPlatform
|
||||||
from components.javaPlatform
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
project( ":release" ).getTasks().named( "publishReleaseArtifacts" ).configure {
|
tasks.register("publishReleaseArtifacts") {
|
||||||
|
// mirror for `:release:publishReleaseArtifacts`
|
||||||
dependsOn tasks.release
|
dependsOn tasks.release
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,9 @@
|
||||||
|
|
||||||
description = 'Integrate support for Spatial/GIS data into Hibernate O/RM'
|
description = 'Integrate support for Spatial/GIS data into Hibernate O/RM'
|
||||||
|
|
||||||
apply from: rootProject.file( 'gradle/relocated-published-java-module.gradle' )
|
apply from: rootProject.file( 'gradle/published-java-module.gradle' )
|
||||||
|
apply from: rootProject.file( 'gradle/group-relocation.gradle' )
|
||||||
|
|
||||||
apply plugin: 'org.hibernate.matrix-test'
|
apply plugin: 'org.hibernate.matrix-test'
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,8 @@
|
||||||
|
|
||||||
description = 'Support for testing Hibernate ORM functionality'
|
description = 'Support for testing Hibernate ORM functionality'
|
||||||
|
|
||||||
apply from: rootProject.file( 'gradle/relocated-published-java-module.gradle' )
|
apply from: rootProject.file( 'gradle/published-java-module.gradle' )
|
||||||
|
apply from: rootProject.file( 'gradle/group-relocation.gradle' )
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
api project( ':hibernate-core' )
|
api project( ':hibernate-core' )
|
||||||
|
|
|
@ -7,7 +7,8 @@
|
||||||
|
|
||||||
description = 'Integration for Oracle UCP into Hibernate O/RM'
|
description = 'Integration for Oracle UCP into Hibernate O/RM'
|
||||||
|
|
||||||
apply from: rootProject.file( 'gradle/relocated-published-java-module.gradle' )
|
apply from: rootProject.file( 'gradle/published-java-module.gradle' )
|
||||||
|
apply from: rootProject.file( 'gradle/group-relocation.gradle' )
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation project( ':hibernate-core' )
|
implementation project( ':hibernate-core' )
|
||||||
|
|
|
@ -7,7 +7,8 @@
|
||||||
|
|
||||||
description = 'Hibernate\'s extensions for vector support'
|
description = 'Hibernate\'s extensions for vector support'
|
||||||
|
|
||||||
apply from: rootProject.file( 'gradle/relocated-published-java-module.gradle' )
|
apply from: rootProject.file( 'gradle/published-java-module.gradle' )
|
||||||
|
apply from: rootProject.file( 'gradle/group-relocation.gradle' )
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
api project( ':hibernate-core' )
|
api project( ':hibernate-core' )
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
|
|
||||||
description = 'Annotation Processor to generate JPA 2 static metamodel classes'
|
description = 'Annotation Processor to generate JPA 2 static metamodel classes'
|
||||||
|
|
||||||
apply from: rootProject.file( 'gradle/relocated-published-java-module.gradle' )
|
apply from: rootProject.file( 'gradle/published-java-module.gradle' )
|
||||||
|
apply from: rootProject.file( 'gradle/group-relocation.gradle' )
|
||||||
apply plugin: 'org.hibernate.build.version-injection'
|
apply plugin: 'org.hibernate.build.version-injection'
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
|
|
@ -73,8 +73,10 @@ tasks.release.dependsOn tasks.publishPlugins
|
||||||
// local publishing (SNAPSHOT testing)
|
// local publishing (SNAPSHOT testing)
|
||||||
tasks.publish.dependsOn tasks.publishPlugins
|
tasks.publish.dependsOn tasks.publishPlugins
|
||||||
|
|
||||||
// Make sure that the publishReleaseArtifacts task of the release module runs the release task of this sub module
|
tasks.register("publishReleaseArtifacts") {
|
||||||
tasks.getByPath( ':release:publishReleaseArtifacts' ).dependsOn tasks.release
|
// mirror for `:release:publishReleaseArtifacts`
|
||||||
|
dependsOn tasks.release
|
||||||
|
}
|
||||||
|
|
||||||
// local publishing (SNAPSHOT testing)
|
// local publishing (SNAPSHOT testing)
|
||||||
publishing {
|
publishing {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
description = 'Maven plugin to integrate aspects of Hibernate into your build.'
|
description = 'Maven plugin to integrate aspects of Hibernate into your build.'
|
||||||
|
|
||||||
apply from: rootProject.file( 'gradle/publishing-pom.gradle' )
|
|
||||||
apply from: rootProject.file( 'gradle/java-module.gradle' )
|
apply from: rootProject.file( 'gradle/java-module.gradle' )
|
||||||
|
apply from: rootProject.file( 'gradle/publishing.gradle' )
|
||||||
|
|
||||||
apply plugin: 'org.hibernate.build.maven-embedder'
|
apply plugin: 'org.hibernate.build.maven-embedder'
|
||||||
|
|
||||||
|
@ -21,63 +21,60 @@ dependencies {
|
||||||
implementation "org.apache.maven.shared:file-management:3.1.0"
|
implementation "org.apache.maven.shared:file-management:3.1.0"
|
||||||
}
|
}
|
||||||
|
|
||||||
publishing {
|
var publishingExtension = project.getExtensions().getByType(PublishingExtension) as PublishingExtension
|
||||||
publications {
|
publishingExtension.publications.named("publishedArtifacts") {
|
||||||
publishedArtifacts(MavenPublication) {
|
from components.java
|
||||||
from components.java
|
|
||||||
pom.withXml {
|
|
||||||
asNode()
|
|
||||||
.version
|
|
||||||
.plus {
|
|
||||||
packaging('maven-plugin')
|
|
||||||
}
|
|
||||||
asNode()
|
|
||||||
.dependencies
|
|
||||||
.dependency
|
|
||||||
.findAll { dependency ->
|
|
||||||
dependency.groupId.text().startsWith('org.apache.maven')
|
|
||||||
}
|
|
||||||
.each { dependency ->
|
|
||||||
if (dependency.groupId.text().startsWith('org.apache.maven.shared')) {
|
|
||||||
dependency.scope*.value = 'compile'
|
|
||||||
} else {
|
|
||||||
dependency.scope*.value = 'provided'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
asNode()
|
|
||||||
.dependencies
|
|
||||||
.dependency
|
|
||||||
.findAll { dependency ->
|
|
||||||
dependency.groupId.text().startsWith('org.hibernate.orm')
|
|
||||||
}
|
|
||||||
.each { dependency ->
|
|
||||||
dependency.scope*.value = 'compile'
|
|
||||||
}
|
|
||||||
asNode()
|
|
||||||
.dependencies
|
|
||||||
.plus {
|
|
||||||
def plugins = build().appendNode('plugins')
|
|
||||||
def pluginPlugin = plugins.appendNode('plugin')
|
|
||||||
pluginPlugin.appendNode('groupId', 'org.apache.maven.plugins')
|
|
||||||
pluginPlugin.appendNode('artifactId', 'maven-plugin-plugin')
|
|
||||||
pluginPlugin.appendNode('version', '3.15.0')
|
|
||||||
def pluginConfiguration = pluginPlugin.appendNode('configuration')
|
|
||||||
pluginConfiguration.appendNode('goalPrefix', 'plugin')
|
|
||||||
pluginConfiguration.appendNode('outputDirectory', layout.buildDirectory.dir('generated/sources/plugin-descriptors/META-INF/maven').get().getAsFile().getAbsolutePath() )
|
|
||||||
def invokerPlugin = plugins.appendNode('plugin');
|
|
||||||
invokerPlugin.appendNode('groupId', 'org.apache.maven.plugins')
|
|
||||||
invokerPlugin.appendNode('artifactId', 'maven-invoker-plugin')
|
|
||||||
invokerPlugin.appendNode('version', '3.8.0')
|
|
||||||
def invokerConfiguration = invokerPlugin.appendNode('configuration');
|
|
||||||
invokerConfiguration.appendNode('debug', 'true');
|
|
||||||
invokerConfiguration.appendNode('mavenExecutable', 'mvnw');
|
|
||||||
def scriptVariables = invokerConfiguration.appendNode('scriptVariables');
|
|
||||||
scriptVariables.appendNode('hibernateCoreJarPath', layout.buildDirectory.file('maven-embedder/maven-local/org/hibernate/orm/hibernate-core/' + project.version + '/hibernate-core-' + project.version + '.jar').get().getAsFile().getAbsolutePath())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
pom.withXml {
|
||||||
|
asNode()
|
||||||
|
.version
|
||||||
|
.plus {
|
||||||
|
packaging('maven-plugin')
|
||||||
|
}
|
||||||
|
asNode()
|
||||||
|
.dependencies
|
||||||
|
.dependency
|
||||||
|
.findAll { dependency ->
|
||||||
|
dependency.groupId.text().startsWith('org.apache.maven')
|
||||||
|
}
|
||||||
|
.each { dependency ->
|
||||||
|
if (dependency.groupId.text().startsWith('org.apache.maven.shared')) {
|
||||||
|
dependency.scope*.value = 'compile'
|
||||||
|
} else {
|
||||||
|
dependency.scope*.value = 'provided'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
asNode()
|
||||||
|
.dependencies
|
||||||
|
.dependency
|
||||||
|
.findAll { dependency ->
|
||||||
|
dependency.groupId.text().startsWith('org.hibernate.orm')
|
||||||
|
}
|
||||||
|
.each { dependency ->
|
||||||
|
dependency.scope*.value = 'compile'
|
||||||
|
}
|
||||||
|
asNode()
|
||||||
|
.dependencies
|
||||||
|
.plus {
|
||||||
|
def plugins = build().appendNode('plugins')
|
||||||
|
def pluginPlugin = plugins.appendNode('plugin')
|
||||||
|
pluginPlugin.appendNode('groupId', 'org.apache.maven.plugins')
|
||||||
|
pluginPlugin.appendNode('artifactId', 'maven-plugin-plugin')
|
||||||
|
pluginPlugin.appendNode('version', '3.15.0')
|
||||||
|
def pluginConfiguration = pluginPlugin.appendNode('configuration')
|
||||||
|
pluginConfiguration.appendNode('goalPrefix', 'plugin')
|
||||||
|
pluginConfiguration.appendNode('outputDirectory', layout.buildDirectory.dir('generated/sources/plugin-descriptors/META-INF/maven').get().getAsFile().getAbsolutePath() )
|
||||||
|
def invokerPlugin = plugins.appendNode('plugin');
|
||||||
|
invokerPlugin.appendNode('groupId', 'org.apache.maven.plugins')
|
||||||
|
invokerPlugin.appendNode('artifactId', 'maven-invoker-plugin')
|
||||||
|
invokerPlugin.appendNode('version', '3.8.0')
|
||||||
|
def invokerConfiguration = invokerPlugin.appendNode('configuration');
|
||||||
|
invokerConfiguration.appendNode('debug', 'true');
|
||||||
|
invokerConfiguration.appendNode('mavenExecutable', 'mvnw');
|
||||||
|
def scriptVariables = invokerConfiguration.appendNode('scriptVariables');
|
||||||
|
scriptVariables.appendNode('hibernateCoreJarPath', layout.buildDirectory.file('maven-embedder/maven-local/org/hibernate/orm/hibernate-core/' + project.version + '/hibernate-core-' + project.version + '.jar').get().getAsFile().getAbsolutePath())
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Following tasks need to be performed:
|
// Following tasks need to be performed:
|
||||||
|
|
|
@ -8,7 +8,9 @@ import de.thetaphi.forbiddenapis.gradle.CheckForbiddenApis
|
||||||
*/
|
*/
|
||||||
description = 'Hibernate compile-time tooling'
|
description = 'Hibernate compile-time tooling'
|
||||||
|
|
||||||
apply from: rootProject.file( 'gradle/relocated-published-java-module.gradle' )
|
apply from: rootProject.file( 'gradle/published-java-module.gradle' )
|
||||||
|
apply from: rootProject.file( 'gradle/group-relocation.gradle' )
|
||||||
|
|
||||||
apply plugin: 'org.hibernate.build.version-injection'
|
apply plugin: 'org.hibernate.build.version-injection'
|
||||||
|
|
||||||
//java {
|
//java {
|
||||||
|
@ -144,60 +146,27 @@ compileTestJava {
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
publishing {
|
var publishingExtension = project.getExtensions().getByType(PublishingExtension) as PublishingExtension
|
||||||
publications {
|
|
||||||
// relocation for the published artifacts based on the old groupId
|
publishingExtension.publications.named("groupRelocation", MavenPublication) {
|
||||||
relocationPom(MavenPublication) {
|
// org.hibernate:hibernate-jpamodelgen -> org.hibernate.orm:hibernate-processor
|
||||||
pom {
|
pom {
|
||||||
name = 'hibernate-jpamodelgen - relocation'
|
artifactId = 'hibernate-jpamodelgen'
|
||||||
groupId = 'org.hibernate.orm'
|
name = 'hibernate-jpamodelgen (relocated)'
|
||||||
artifactId = 'hibernate-jpamodelgen'
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
publishingExtension.publications.register("renameRelocation", MavenPublication) {
|
||||||
|
// org.hibernate.orm:hibernate-jpamodelgen -> org.hibernate.orm:hibernate-processor
|
||||||
|
pom {
|
||||||
|
artifactId = 'hibernate-jpamodelgen'
|
||||||
|
name = 'hibernate-jpamodelgen (relocated)'
|
||||||
|
|
||||||
|
distributionManagement {
|
||||||
|
relocation {
|
||||||
|
groupId = project.group
|
||||||
|
artifactId = project.name
|
||||||
version = project.version
|
version = project.version
|
||||||
|
|
||||||
description = project.description
|
|
||||||
url = 'https://hibernate.org/orm'
|
|
||||||
|
|
||||||
organization {
|
|
||||||
name = 'Hibernate.org'
|
|
||||||
url = 'https://hibernate.org'
|
|
||||||
}
|
|
||||||
|
|
||||||
licenses {
|
|
||||||
license {
|
|
||||||
name = 'GNU Library General Public License v2.1 or later'
|
|
||||||
url = 'https://www.opensource.org/licenses/LGPL-2.1'
|
|
||||||
comments = 'See discussion at https://hibernate.org/community/license/ for more details.'
|
|
||||||
distribution = 'repo'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
scm {
|
|
||||||
url = 'https://github.com/hibernate/hibernate-orm'
|
|
||||||
connection = 'scm:git:https://github.com/hibernate/hibernate-orm.git'
|
|
||||||
developerConnection = 'scm:git:git@github.com:hibernate/hibernate-orm.git'
|
|
||||||
}
|
|
||||||
|
|
||||||
developers {
|
|
||||||
developer {
|
|
||||||
id = 'hibernate-team'
|
|
||||||
name = 'The Hibernate Development Team'
|
|
||||||
organization = 'Hibernate.org'
|
|
||||||
organizationUrl = 'https://hibernate.org'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
issueManagement {
|
|
||||||
system = 'jira'
|
|
||||||
url = 'https://hibernate.atlassian.net/browse/HHH'
|
|
||||||
}
|
|
||||||
|
|
||||||
distributionManagement {
|
|
||||||
relocation {
|
|
||||||
groupId = 'org.hibernate.orm'
|
|
||||||
artifactId = project.name
|
|
||||||
version = project.version
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue