From 3e1f6b52c646d969b79f1c250cc4abb3ae0b6db0 Mon Sep 17 00:00:00 2001 From: Steve Ebersole Date: Wed, 13 Nov 2024 14:13:08 -0600 Subject: [PATCH] fix hibernate-scan-jandex definitions --- gradle/published-java-module.gradle | 12 ++++++++++++ gradle/relocated-published-java-module.gradle | 5 ----- hibernate-core/hibernate-core.gradle | 2 -- .../boot/archive/scan/spi/ScannerFactory.java | 14 ++++++++++++++ hibernate-scan-jandex/hibernate-scan-jandex.gradle | 8 -------- 5 files changed, 26 insertions(+), 15 deletions(-) diff --git a/gradle/published-java-module.gradle b/gradle/published-java-module.gradle index be7d9a1568..01333d0119 100644 --- a/gradle/published-java-module.gradle +++ b/gradle/published-java-module.gradle @@ -28,7 +28,19 @@ dependencies { // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Publishing +publishing { + publications { + // main publication + publishedArtifacts { + // Add the Java component to the main publication + from components.java + } + } +} + java { + // include javadoc and sources jar in the Java component + // - classes jar included by default withJavadocJar() withSourcesJar() } diff --git a/gradle/relocated-published-java-module.gradle b/gradle/relocated-published-java-module.gradle index 8aeee228a4..35b2eecc2a 100644 --- a/gradle/relocated-published-java-module.gradle +++ b/gradle/relocated-published-java-module.gradle @@ -8,11 +8,6 @@ apply from: rootProject.file( 'gradle/published-java-module.gradle' ) publishing { publications { - // main publication - publishedArtifacts { - from components.java - } - // relocation for the published artifacts based on the old groupId relocationPom( MavenPublication ) { pom { diff --git a/hibernate-core/hibernate-core.gradle b/hibernate-core/hibernate-core.gradle index ce7be417b9..e18cdef49b 100644 --- a/hibernate-core/hibernate-core.gradle +++ b/hibernate-core/hibernate-core.gradle @@ -48,8 +48,6 @@ dependencies { // annotationProcessor project( ":annotation-descriptor-generator" ) compileOnly project( ":annotation-descriptor-generator" ) - runtimeOnly project(':hibernate-scan-jandex') - testImplementation project(':hibernate-testing') testImplementation project(':hibernate-ant') testImplementation project(':hibernate-scan-jandex') diff --git a/hibernate-core/src/main/java/org/hibernate/boot/archive/scan/spi/ScannerFactory.java b/hibernate-core/src/main/java/org/hibernate/boot/archive/scan/spi/ScannerFactory.java index cc08717acc..0b34f05311 100644 --- a/hibernate-core/src/main/java/org/hibernate/boot/archive/scan/spi/ScannerFactory.java +++ b/hibernate-core/src/main/java/org/hibernate/boot/archive/scan/spi/ScannerFactory.java @@ -4,9 +4,23 @@ */ package org.hibernate.boot.archive.scan.spi; +import org.hibernate.Incubating; import org.hibernate.boot.archive.spi.ArchiveDescriptorFactory; +import org.hibernate.service.JavaServiceLoadable; import org.hibernate.service.Service; +/** + * Support for scanning various sources to detect {@code managed resources} + * for a {@code persistence unit}. + * + */ +@Incubating +@JavaServiceLoadable public interface ScannerFactory extends Service { + /** + * Create a scanner + * @param archiveDescriptorFactory + * @return + */ Scanner getScanner(ArchiveDescriptorFactory archiveDescriptorFactory); } diff --git a/hibernate-scan-jandex/hibernate-scan-jandex.gradle b/hibernate-scan-jandex/hibernate-scan-jandex.gradle index aab65a3eb7..e016a3b60f 100644 --- a/hibernate-scan-jandex/hibernate-scan-jandex.gradle +++ b/hibernate-scan-jandex/hibernate-scan-jandex.gradle @@ -2,17 +2,9 @@ description = 'Integrate support for Jandex into Hibernate O/RM' apply from: rootProject.file( 'gradle/published-java-module.gradle' ) - dependencies { api project( ':hibernate-core' ) api jakartaLibs.jpa implementation libs.jandex - - testImplementation project( ':hibernate-testing' ) - } - -sourceSets.test.resources { - setSrcDirs( ['src/test/resources'] ) -} \ No newline at end of file