HHH-12246 - Gradle build fails with Java 9

This commit is contained in:
Andrea Boriero 2018-01-22 18:37:23 +00:00
parent fda63bfbe5
commit 9d335961b8
3 changed files with 28 additions and 3 deletions

View File

@ -112,19 +112,18 @@ dependencies {
compile( 'org.glassfish.jaxb:jaxb-xjc:2.2.11' ) compile( 'org.glassfish.jaxb:jaxb-xjc:2.2.11' )
compile( 'org.jvnet.jaxb2_commons:jaxb2-basics:0.11.0' ) compile( 'org.jvnet.jaxb2_commons:jaxb2-basics:0.11.0' )
compile( 'org.jvnet.jaxb2_commons:jaxb2-basics-ant:0.11.0' ) compile( 'org.jvnet.jaxb2_commons:jaxb2-basics-ant:0.11.0' )
compile( 'javax:javaee-api:7.0' ) compile( 'javax.annotation:jsr250-api:1.0' )
testCompile( 'com.sun.xml.bind:jaxb-impl:2.2.11' ) testCompile( 'com.sun.xml.bind:jaxb-impl:2.2.11' )
testCompile( 'org.glassfish.jaxb:jaxb-xjc:2.2.11' ) testCompile( 'org.glassfish.jaxb:jaxb-xjc:2.2.11' )
testCompile( 'org.jvnet.jaxb2_commons:jaxb2-basics:0.11.0' ) testCompile( 'org.jvnet.jaxb2_commons:jaxb2-basics:0.11.0' )
testCompile( 'org.jvnet.jaxb2_commons:jaxb2-basics-ant:0.11.0' ) testCompile( 'org.jvnet.jaxb2_commons:jaxb2-basics-ant:0.11.0' )
testCompile( 'javax:javaee-api:7.0' ) testCompile( 'javax.annotation:jsr250-api:1.0' )
testRuntime( 'com.sun.xml.bind:jaxb-impl:2.2.11' ) testRuntime( 'com.sun.xml.bind:jaxb-impl:2.2.11' )
testRuntime( 'org.glassfish.jaxb:jaxb-xjc:2.2.11' ) testRuntime( 'org.glassfish.jaxb:jaxb-xjc:2.2.11' )
testRuntime( 'org.jvnet.jaxb2_commons:jaxb2-basics:0.11.0' ) testRuntime( 'org.jvnet.jaxb2_commons:jaxb2-basics:0.11.0' )
testRuntime( 'org.jvnet.jaxb2_commons:jaxb2-basics-ant:0.11.0' ) testRuntime( 'org.jvnet.jaxb2_commons:jaxb2-basics-ant:0.11.0' )
testRuntime( 'javax:javaee-api:7.0' )
} }
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

View File

@ -23,6 +23,19 @@ configurations {
} }
dependencies { dependencies {
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Java 9 ftw!
if ( JavaVersion.current().isJava9Compatible() ) {
xjc( 'com.sun.xml.bind:jaxb-impl:2.2.11' )
xjc( 'org.glassfish.jaxb:jaxb-xjc:2.2.11' )
xjc( 'org.jvnet.jaxb2_commons:jaxb2-basics:0.11.0' )
xjc( 'org.jvnet.jaxb2_commons:jaxb2-basics-ant:0.11.0' )
xjc( 'javax.activation:javax.activation-api:1.2.0' )
xjc( 'javax.annotation:jsr250-api:1.0' )
}
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compile( libraries.jpa ) compile( libraries.jpa )
compile( libraries.javassist ) compile( libraries.javassist )
// provided until 6.0 when we make it the default and drop Javassist support // provided until 6.0 when we make it the default and drop Javassist support

View File

@ -20,6 +20,19 @@ dependencies {
testCompile libraries.junit testCompile libraries.junit
testCompile libraries.jpa testCompile libraries.jpa
testCompile project( ':hibernate-core' ) testCompile project( ':hibernate-core' )
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Java 9 ftw!
if ( JavaVersion.current().isJava9Compatible() ) {
xjc( 'com.sun.xml.bind:jaxb-impl:2.2.11' )
xjc( 'org.glassfish.jaxb:jaxb-xjc:2.2.11' )
xjc( 'org.jvnet.jaxb2_commons:jaxb2-basics:0.11.0' )
xjc( 'org.jvnet.jaxb2_commons:jaxb2-basics-ant:0.11.0' )
xjc( 'javax.activation:javax.activation-api:1.2.0' )
xjc( 'javax.annotation:jsr250-api:1.0' )
}
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
} }
sourceSets.main { sourceSets.main {