From f2446e2ce572fc7bbfdde28d8d87a0bc67ebc529 Mon Sep 17 00:00:00 2001 From: Christian Beikov Date: Mon, 23 May 2022 11:35:40 +0200 Subject: [PATCH] Workaround XJC generation issue --- hibernate-core/hibernate-core.gradle | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/hibernate-core/hibernate-core.gradle b/hibernate-core/hibernate-core.gradle index 203b1668ab..f15118faa9 100644 --- a/hibernate-core/hibernate-core.gradle +++ b/hibernate-core/hibernate-core.gradle @@ -129,14 +129,21 @@ xjc { // xjcBindingFile = file( 'src/main/xjb/mapping-bindings.xjb' ) // xjcExtensions += ['inheritance'] // } - mapping { - xsdFile = file( 'src/main/resources/org/hibernate/xsd/mapping/mapping-3.1.0.xsd' ) - xjcBindingFile = file( 'src/main/xjb/mapping-bindings.xjb' ) - xjcExtensions += ['inheritance', 'simplify'] - } +// mapping { +// xsdFile = file( 'src/main/resources/org/hibernate/xsd/mapping/mapping-3.1.0.xsd' ) +// xjcBindingFile = file( 'src/main/xjb/mapping-bindings.xjb' ) +// xjcExtensions += ['inheritance', 'simplify'] +// } } } +task mappingXsd (type: org.hibernate.build.gradle.xjc.jakarta.XjcTask) { + outputDirectory = project.jaxbTargetDir + xsdFile = file( 'src/main/resources/org/hibernate/xsd/mapping/mapping-3.1.0.xsd' ) + xjcBindingFile = file( 'src/main/xjb/mapping-bindings.xjb' ) + xjcExtensions = ['inheritance', 'simplify'] +} +tasks.findByPath( sourceSets.findByName( SourceSet.MAIN_SOURCE_SET_NAME ).getCompileJavaTaskName() ).dependsOn mappingXsd task copyBundleResources (type: Copy) { inputs.property( "db", db )