From fdd15307e01754df962cbfc418c2e544339f6b37 Mon Sep 17 00:00:00 2001 From: Steve Ebersole Date: Fri, 17 Jun 2016 10:55:24 -0500 Subject: [PATCH] HHH-10864 - Allow ORM to be built with Java 9 --- hibernate-core/hibernate-core.gradle | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/hibernate-core/hibernate-core.gradle b/hibernate-core/hibernate-core.gradle index bf5a46bfe9..ef2bc7bf07 100644 --- a/hibernate-core/hibernate-core.gradle +++ b/hibernate-core/hibernate-core.gradle @@ -205,3 +205,15 @@ task testJar(type: Jar, dependsOn: testClasses) { artifacts { tests testJar } + +if ( JavaVersion.current().isJava9Compatible() ) { + // we need to exclude tests using Javassist enhancement, which does not properly support + // Java 9 yet - https://issues.jboss.org/browse/JASSIST-261 + test { + // rather than wild-cards, keep an explicit list + exclude 'org/hibernate/jpa/test/enhancement/InterceptFieldClassFileTransformerTest.class' + exclude 'org/hibernate/jpa/test/enhancement/runtime/JpaRuntimeEnhancementTest.class' + exclude 'org/hibernate/test/bytecode/enhancement/EnhancerTest.class' + exclude 'org/hibernate/test/bytecode/enhancement/basic/BasicInSessionTest.class' + } +} \ No newline at end of file