Workaround XJC generation issue

This commit is contained in:
Christian Beikov 2022-05-23 11:35:40 +02:00
parent 81d749e930
commit f2446e2ce5
1 changed files with 12 additions and 5 deletions

View File

@ -129,14 +129,21 @@ xjc {
// xjcBindingFile = file( 'src/main/xjb/mapping-bindings.xjb' ) // xjcBindingFile = file( 'src/main/xjb/mapping-bindings.xjb' )
// xjcExtensions += ['inheritance'] // xjcExtensions += ['inheritance']
// } // }
mapping { // mapping {
xsdFile = file( 'src/main/resources/org/hibernate/xsd/mapping/mapping-3.1.0.xsd' ) // xsdFile = file( 'src/main/resources/org/hibernate/xsd/mapping/mapping-3.1.0.xsd' )
xjcBindingFile = file( 'src/main/xjb/mapping-bindings.xjb' ) // xjcBindingFile = file( 'src/main/xjb/mapping-bindings.xjb' )
xjcExtensions += ['inheritance', 'simplify'] // 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) { task copyBundleResources (type: Copy) {
inputs.property( "db", db ) inputs.property( "db", db )