From 40d82d6370ff446d8a10a10e226db94b1866a906 Mon Sep 17 00:00:00 2001 From: Andrea Boriero Date: Mon, 6 Apr 2020 18:21:11 +0100 Subject: [PATCH] HHH-14640 : Fix issue with generated pom missing project description --- gradle/java-module.gradle | 6 +- hibernate-agroal/hibernate-agroal.gradle | 4 +- hibernate-c3p0/hibernate-c3p0.gradle | 4 +- hibernate-core/hibernate-core.gradle | 73 +++++++++++++------ hibernate-ehcache/hibernate-ehcache.gradle | 4 +- .../hibernate-entitymanager.gradle | 3 +- hibernate-envers/hibernate-envers.gradle | 4 +- hibernate-hikaricp/hibernate-hikaricp.gradle | 4 +- .../hibernate-infinispan.gradle | 4 +- hibernate-java8/hibernate-java8.gradle | 2 +- hibernate-jcache/hibernate-jcache.gradle | 3 +- hibernate-jipijapa/hibernate-jipijapa.gradle | 3 +- .../hibernate-orm-modules.gradle | 28 +++---- hibernate-osgi/hibernate-osgi.gradle | 3 +- hibernate-proxool/hibernate-proxool.gradle | 3 +- hibernate-spatial/hibernate-spatial.gradle | 3 +- hibernate-testing/hibernate-testing.gradle | 3 +- hibernate-vibur/hibernate-vibur.gradle | 3 +- .../hibernate-enhance-maven-plugin.gradle | 5 +- .../hibernate-gradle-plugin.gradle | 4 +- .../hibernate-jpamodelgen.gradle | 3 +- 21 files changed, 105 insertions(+), 64 deletions(-) diff --git a/gradle/java-module.gradle b/gradle/java-module.gradle index ac8acb4575..f7e8d7f5c5 100644 --- a/gradle/java-module.gradle +++ b/gradle/java-module.gradle @@ -42,10 +42,8 @@ ext { sourceCompatibility = project.baselineJavaVersion targetCompatibility = project.baselineJavaVersion -afterEvaluate { - if ( !project.description ) { - project.description = "The Hibernate ORM $project.name module" - } +if ( !project.description ) { + project.description = "The Hibernate ORM $project.name module" } diff --git a/hibernate-agroal/hibernate-agroal.gradle b/hibernate-agroal/hibernate-agroal.gradle index fb6825d443..86b7a68518 100644 --- a/hibernate-agroal/hibernate-agroal.gradle +++ b/hibernate-agroal/hibernate-agroal.gradle @@ -5,10 +5,10 @@ * See the lgpl.txt file in the root directory or . */ -apply from: rootProject.file( 'gradle/published-java-module.gradle' ) - description = 'Integration for Agroal as a ConnectionProvider for Hibernate ORM' +apply from: rootProject.file( 'gradle/published-java-module.gradle' ) + dependencies { compile project( ':hibernate-core' ) compile( libraries.agroal_api ) diff --git a/hibernate-c3p0/hibernate-c3p0.gradle b/hibernate-c3p0/hibernate-c3p0.gradle index d76872a461..a5ff50748e 100644 --- a/hibernate-c3p0/hibernate-c3p0.gradle +++ b/hibernate-c3p0/hibernate-c3p0.gradle @@ -5,10 +5,10 @@ * See the lgpl.txt file in the root directory or . */ -apply from: rootProject.file( 'gradle/published-java-module.gradle' ) - description = 'Integration for c3p0 Connection pooling into Hibernate ORM' +apply from: rootProject.file( 'gradle/published-java-module.gradle' ) + dependencies { compile project( ':hibernate-core' ) compile( libraries.c3p0 ) diff --git a/hibernate-core/hibernate-core.gradle b/hibernate-core/hibernate-core.gradle index a96be52ed9..a819188ff8 100644 --- a/hibernate-core/hibernate-core.gradle +++ b/hibernate-core/hibernate-core.gradle @@ -6,26 +6,52 @@ */ import org.apache.tools.ant.filters.ReplaceTokens +description = 'Hibernate\'s core ORM functionality' + apply from: rootProject.file( 'gradle/published-java-module.gradle' ) apply plugin: 'antlr' apply plugin: 'hibernate-matrix-testing' apply plugin: 'org.hibernate.build.gradle.xjc' -description = 'Hibernate\'s core ORM functionality' +ext { + jaxbTargetDir = file( "${buildDir}/generated-src/jaxb/main" ) +} + +sourceSets.main { + java.srcDir project.jaxbTargetDir +} + +sourceSets { + // resources inherently exclude sources + test { + resources { + setSrcDirs( ['src/test/java','src/test/resources'] ) + } + } + + testJavassist { + java { + compileClasspath += main.output + test.output + runtimeClasspath += main.output + test.output + } + } +} configurations { - hibernateJpaModelGenTool { - description = "Dependencies for running the Hibernate JPA Metamodel Generator AnnotationProcessor tool" - } tests { description = 'Configuration for the produced test jar' } + + //Configures the compile and runtime configurations for our javassist tests + //and includes the dependencies of the test task. + testJavassistCompile.extendsFrom testCompile + testJavassistRuntime.extendsFrom testRuntime } dependencies { compile( libraries.jpa ) - // Javassist is no longer the default enhancer but still required for other purposes, e.g. Scanning + // This can now be made provided compile( libraries.javassist ) // Could be made optional? compile( libraries.byteBuddy ) @@ -67,6 +93,7 @@ dependencies { testCompile( libraries.mockito ) testCompile( libraries.mockito_inline ) testCompile( libraries.jodaTime ) + testCompile( libraries.assertj ) testCompile( libraries.cdi ) { // we need to force it to make sure we influence the one coming from arquillian @@ -87,9 +114,11 @@ dependencies { testRuntime( libraries.javassist ) testRuntime( libraries.byteBuddy ) testRuntime( libraries.weld ) + testRuntime( libraries.atomikos ) + testRuntime( libraries.atomikos_jta ) testRuntime(libraries.wildfly_transaction_client) - testCompile( project( ':hibernate-jpamodelgen' ) ) + testAnnotationProcessor( project( ':hibernate-jpamodelgen' ) ) testCompile libraries.arquillian_junit_container testCompile libraries.arquillian_protocol_servlet @@ -99,6 +128,10 @@ dependencies { testCompile libraries.jboss_ejb_spec_jar testCompile libraries.jboss_annotation_spec_jar + + // Additional tests requiring Javassist + // folder in src/javassist/java + testJavassistCompile libraries.javassist } jar { @@ -154,19 +187,6 @@ jar { } } -ext { - jaxbTargetDir = file( "${buildDir}/generated-src/jaxb/main" ) -} - -sourceSets.main { - java.srcDir project.jaxbTargetDir -} - -// resources inherently exclude sources -sourceSets.test.resources { - setSrcDirs( ['src/test/java','src/test/resources'] ) -} - //idea { // module { // sourceDirs += file( "${buildDir}/generated-src/antlr/main" ) @@ -238,9 +258,20 @@ test.dependsOn ':hibernate-orm-modules:prepareWildFlyForTests' test { systemProperty 'file.encoding', 'utf-8' - //Set the port-offset to match the offset in arquillian.xml - systemProperty 'jboss.socket.binding.port-offset', '137' beforeTest { descriptor -> //println "Starting test: " + descriptor } } + +//Create the task that runs the integration tests found from the +//configured source directory and uses the correct classpath. +task testJavassist(type: Test) { + testClassesDirs = sourceSets.testJavassist.output.classesDirs + classpath = sourceSets.testJavassist.runtimeClasspath + //If you want to ensure that integration tests are run every time when you invoke + //this task, uncomment the following line. + //outputs.upToDateWhen { false } +} + +check.dependsOn testJavassist +testJavassist.mustRunAfter test diff --git a/hibernate-ehcache/hibernate-ehcache.gradle b/hibernate-ehcache/hibernate-ehcache.gradle index 30984cbd3d..311068dde2 100644 --- a/hibernate-ehcache/hibernate-ehcache.gradle +++ b/hibernate-ehcache/hibernate-ehcache.gradle @@ -5,10 +5,10 @@ * See the lgpl.txt file in the root directory or . */ -apply from: rootProject.file( 'gradle/published-java-module.gradle' ) - description = "Integration for using Ehcache 2.x as a Hibernate second-level-cache provider" +apply from: rootProject.file( 'gradle/published-java-module.gradle' ) + dependencies { compile project( ':hibernate-core' ) compile( libraries.ehcache ) diff --git a/hibernate-entitymanager/hibernate-entitymanager.gradle b/hibernate-entitymanager/hibernate-entitymanager.gradle index af066a55fe..6d9e7a9fa7 100644 --- a/hibernate-entitymanager/hibernate-entitymanager.gradle +++ b/hibernate-entitymanager/hibernate-entitymanager.gradle @@ -1,8 +1,7 @@ +description = '(deprecated - use hibernate-core instead) Hibernate O/RM implementation of the JPA specification' apply from: rootProject.file( 'gradle/published-java-module.gradle' ) -description = '(deprecated - use hibernate-core instead) Hibernate O/RM implementation of the JPA specification' - dependencies { compile( project( ':hibernate-core' ) ) compile( libraries.dom4j ) diff --git a/hibernate-envers/hibernate-envers.gradle b/hibernate-envers/hibernate-envers.gradle index fdaf4c43ae..80483b760e 100644 --- a/hibernate-envers/hibernate-envers.gradle +++ b/hibernate-envers/hibernate-envers.gradle @@ -5,11 +5,11 @@ * See the lgpl.txt file in the root directory or . */ +description = 'Hibernate\'s entity version (audit/history) support' + apply from: rootProject.file( 'gradle/published-java-module.gradle' ) apply plugin: 'hibernate-matrix-testing' -description = 'Hibernate\'s entity version (audit/history) support' - dependencies { compile( project( ':hibernate-core' ) ) { // Exclude access to this to avoid future use. diff --git a/hibernate-hikaricp/hibernate-hikaricp.gradle b/hibernate-hikaricp/hibernate-hikaricp.gradle index 2e50358860..7fe7457397 100644 --- a/hibernate-hikaricp/hibernate-hikaricp.gradle +++ b/hibernate-hikaricp/hibernate-hikaricp.gradle @@ -5,10 +5,10 @@ * See the lgpl.txt file in the root directory or . */ -apply from: rootProject.file( 'gradle/published-java-module.gradle' ) - description = 'Integration for HikariCP into Hibernate O/RM' +apply from: rootProject.file( 'gradle/published-java-module.gradle' ) + dependencies { compile project( ':hibernate-core' ) compile( libraries.hikaricp ) diff --git a/hibernate-infinispan/hibernate-infinispan.gradle b/hibernate-infinispan/hibernate-infinispan.gradle index 4db08089dc..399c41ec25 100644 --- a/hibernate-infinispan/hibernate-infinispan.gradle +++ b/hibernate-infinispan/hibernate-infinispan.gradle @@ -5,14 +5,14 @@ * See the lgpl.txt file in the root directory or . */ +description = '(deprecated - use org.infinispan:infinispan-hibernate-cache-v53 instead)' + apply from: rootProject.file( 'gradle/base-information.gradle' ) apply from: rootProject.file( 'gradle/publishing-repos.gradle' ) apply from: rootProject.file( 'gradle/publishing-pom.gradle' ) apply plugin: 'maven-publish' apply plugin: 'org.hibernate.build.maven-repo-auth' -description = '(deprecated - use org.infinispan:infinispan-hibernate-cache-v53 instead)' - ext { relocatedGroupId = 'org.infinispan' relocatedArtifactId = 'infinispan-hibernate-cache-v53' diff --git a/hibernate-java8/hibernate-java8.gradle b/hibernate-java8/hibernate-java8.gradle index 32c13a4603..92511a29e6 100644 --- a/hibernate-java8/hibernate-java8.gradle +++ b/hibernate-java8/hibernate-java8.gradle @@ -1,7 +1,7 @@ +description = '(deprecated - use hibernate-core instead) Support for Java8-specific features - mainly Java8 Date/Time (JSR 310)' apply from: rootProject.file( 'gradle/published-java-module.gradle' ) -description = '(deprecated - use hibernate-core instead) Support for Java8-specific features - mainly Java8 Date/Time (JSR 310)' dependencies { compile( project( ':hibernate-core' ) ) diff --git a/hibernate-jcache/hibernate-jcache.gradle b/hibernate-jcache/hibernate-jcache.gradle index 61f3101d4c..015acfba50 100644 --- a/hibernate-jcache/hibernate-jcache.gradle +++ b/hibernate-jcache/hibernate-jcache.gradle @@ -1,6 +1,7 @@ +description = 'Integration for javax.cache into Hibernate as a second-level caching service' + apply from: rootProject.file( 'gradle/published-java-module.gradle' ) -description = 'Integration for javax.cache into Hibernate as a second-level caching service' dependencies { compile project( ':hibernate-core' ) diff --git a/hibernate-jipijapa/hibernate-jipijapa.gradle b/hibernate-jipijapa/hibernate-jipijapa.gradle index 584ce34d49..97c29862af 100644 --- a/hibernate-jipijapa/hibernate-jipijapa.gradle +++ b/hibernate-jipijapa/hibernate-jipijapa.gradle @@ -5,9 +5,10 @@ * See the lgpl.txt file in the root directory or . */ +description = 'Integrate with WildFly JipiJapa' + apply from: rootProject.file( 'gradle/published-java-module.gradle' ) -description = 'Integrate with WildFly JipiJapa' dependencies { compile project( ':hibernate-core' ) diff --git a/hibernate-orm-modules/hibernate-orm-modules.gradle b/hibernate-orm-modules/hibernate-orm-modules.gradle index 0f7b7bfb09..11c9cb46b6 100644 --- a/hibernate-orm-modules/hibernate-orm-modules.gradle +++ b/hibernate-orm-modules/hibernate-orm-modules.gradle @@ -10,10 +10,25 @@ plugins { id "org.wildfly.build.featurepack" version '0.0.9' } + + apply from: rootProject.file( 'gradle/base-information.gradle' ) apply plugin: 'java' apply from: rootProject.file( 'gradle/libraries.gradle' ) +ext { + // NOTE : `wildflyVersion` comes from libraries.gradle... + + // "10" for WildFly 10.x, "11" for 11.x, etc + wildFlyMajorVersion = project.wildflyVersion.split( '\\.' )[0] + bytebuddyVersion = project.byteBuddyVersion + artifactClassifier = "wildfly-${wildFlyMajorVersion}-dist" + wildFlyInstallDir = "$rootProject.buildDir/wildfly" + fpackStagingDir = file( "target/featurepack" ) //Target build directory for the Feature Pack +} + +description = "Feature Pack of Hibernate ORM modules for WildFly ${project.wildFlyMajorVersion}" + apply plugin: 'maven-publish' apply plugin: 'org.hibernate.build.maven-repo-auth' apply from: rootProject.file( 'gradle/publishing-repos.gradle' ) @@ -28,19 +43,6 @@ project.tasks.javadoc.enabled = false evaluationDependsOn( ':hibernate-core' ) evaluationDependsOn( ':hibernate-envers' ) -ext { - // NOTE : `wildflyVersion` comes from libraries.gradle... - - // "10" for WildFly 10.x, "11" for 11.x, etc - wildFlyMajorVersion = project.wildflyVersion.split( '\\.' )[0] - bytebuddyVersion = project.byteBuddyVersion - artifactClassifier = "wildfly-${wildFlyMajorVersion}-dist" - wildFlyInstallDir = "$rootProject.buildDir/wildfly" - fpackStagingDir = file( "target/featurepack" ) //Target build directory for the Feature Pack -} - -description = "Feature Pack of Hibernate ORM modules for WildFly ${project.wildFlyMajorVersion}" - configurations { featurePack { description = "Dependencies to be included in the published Feature Pack" diff --git a/hibernate-osgi/hibernate-osgi.gradle b/hibernate-osgi/hibernate-osgi.gradle index f5b0b6b375..562fbc468c 100644 --- a/hibernate-osgi/hibernate-osgi.gradle +++ b/hibernate-osgi/hibernate-osgi.gradle @@ -5,10 +5,11 @@ * See the lgpl.txt file in the root directory or . */ +description = 'Support for running Hibernate O/RM in OSGi environments' + apply from: rootProject.file( 'gradle/published-java-module.gradle' ) apply plugin: 'com.github.lburgazzoli.karaf' -description = 'Support for running Hibernate O/RM in OSGi environments' ext { osgiCoreVersion = '6.0.0' diff --git a/hibernate-proxool/hibernate-proxool.gradle b/hibernate-proxool/hibernate-proxool.gradle index b97137ea69..8aa0fb69c6 100644 --- a/hibernate-proxool/hibernate-proxool.gradle +++ b/hibernate-proxool/hibernate-proxool.gradle @@ -5,9 +5,10 @@ * See the lgpl.txt file in the root directory or . */ +description = 'Integration for Proxool Connection pooling into Hibernate O/RM' + apply from: rootProject.file( 'gradle/published-java-module.gradle' ) -description = 'Integration for Proxool Connection pooling into Hibernate O/RM' dependencies { compile project( ':hibernate-core' ) diff --git a/hibernate-spatial/hibernate-spatial.gradle b/hibernate-spatial/hibernate-spatial.gradle index 4c4303f6af..573d7f6839 100644 --- a/hibernate-spatial/hibernate-spatial.gradle +++ b/hibernate-spatial/hibernate-spatial.gradle @@ -7,10 +7,11 @@ import org.apache.tools.ant.filters.ReplaceTokens * See the lgpl.txt file in the root directory or . */ +description = 'Integrate support for Spatial/GIS data into Hibernate O/RM' + apply from: rootProject.file( 'gradle/published-java-module.gradle' ) apply plugin: 'hibernate-matrix-testing' -description = 'Integrate support for Spatial/GIS data into Hibernate O/RM' dependencies { compile( project(':hibernate-core') ) diff --git a/hibernate-testing/hibernate-testing.gradle b/hibernate-testing/hibernate-testing.gradle index ed371b88fd..c0f9fb4e30 100644 --- a/hibernate-testing/hibernate-testing.gradle +++ b/hibernate-testing/hibernate-testing.gradle @@ -5,9 +5,10 @@ * See the lgpl.txt file in the root directory or . */ +description = 'Support for testing Hibernate ORM functionality' + apply from: rootProject.file( 'gradle/published-java-module.gradle' ) -description = 'Support for testing Hibernate ORM functionality' dependencies { compile project( ':hibernate-core' ) diff --git a/hibernate-vibur/hibernate-vibur.gradle b/hibernate-vibur/hibernate-vibur.gradle index aac801256f..fd1ad3370e 100644 --- a/hibernate-vibur/hibernate-vibur.gradle +++ b/hibernate-vibur/hibernate-vibur.gradle @@ -5,9 +5,10 @@ * See the lgpl.txt file in the root directory or . */ +description = 'Integration for Vibur Connection pooling as a Hibernate ORM ConnectionProvider' + apply from: rootProject.file( 'gradle/published-java-module.gradle' ) -description = 'Integration for Vibur Connection pooling as a Hibernate ORM ConnectionProvider' dependencies { compile project( ':hibernate-core' ) diff --git a/tooling/hibernate-enhance-maven-plugin/hibernate-enhance-maven-plugin.gradle b/tooling/hibernate-enhance-maven-plugin/hibernate-enhance-maven-plugin.gradle index a033c167b7..8150978e08 100644 --- a/tooling/hibernate-enhance-maven-plugin/hibernate-enhance-maven-plugin.gradle +++ b/tooling/hibernate-enhance-maven-plugin/hibernate-enhance-maven-plugin.gradle @@ -4,13 +4,14 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ +description = 'Enhance Plugin of the Hibernate project for use with Maven build system.' + apply from: rootProject.file( 'gradle/published-java-module.gradle' ) apply plugin: 'maven' -import org.apache.tools.ant.filters.ReplaceTokens +import org.apache.tools.ant.filters.ReplaceTokens group = 'org.hibernate.orm.tooling' -description = 'Enhance Plugin of the Hibernate project for use with Maven build system.' processResources { include "**/lifecycle-mapping-metadata.xml" diff --git a/tooling/hibernate-gradle-plugin/hibernate-gradle-plugin.gradle b/tooling/hibernate-gradle-plugin/hibernate-gradle-plugin.gradle index fc261b8de3..20e82c3c1e 100644 --- a/tooling/hibernate-gradle-plugin/hibernate-gradle-plugin.gradle +++ b/tooling/hibernate-gradle-plugin/hibernate-gradle-plugin.gradle @@ -5,11 +5,13 @@ * See the lgpl.txt file in the root directory or . */ apply plugin: 'groovy' + +description = "Gradle plugin for integrating Hibernate functionality into your build" + apply from: rootProject.file( 'gradle/published-java-module.gradle' ) apply plugin: 'java-gradle-plugin' apply plugin: 'maven' -description = "Gradle plugin for integrating Hibernate functionality into your build" dependencies { compile( project( ':hibernate-core' ) ) diff --git a/tooling/metamodel-generator/hibernate-jpamodelgen.gradle b/tooling/metamodel-generator/hibernate-jpamodelgen.gradle index a192eb9c48..6b979a476f 100644 --- a/tooling/metamodel-generator/hibernate-jpamodelgen.gradle +++ b/tooling/metamodel-generator/hibernate-jpamodelgen.gradle @@ -5,11 +5,12 @@ * See the lgpl.txt file in the root directory or . */ +description = 'Annotation Processor to generate JPA 2 static metamodel classes' + apply from: rootProject.file( 'gradle/published-java-module.gradle' ) apply plugin: 'version-injection' apply plugin: 'org.hibernate.build.gradle.xjc' -description = 'Annotation Processor to generate JPA 2 static metamodel classes' ext { xjcTargetDir = file( "${buildDir}/generated-src/xjc/main" )