From 81f4ab8f062e3df565537ecb41017cdd93805547 Mon Sep 17 00:00:00 2001 From: Andrea Boriero Date: Thu, 21 Sep 2017 20:59:05 +0100 Subject: [PATCH] HHH-112001 - upgrade Byteman version and disable findbugs for JDK 9 --- build.gradle | 53 +++++++++++++++++++++++++++--------------------- libraries.gradle | 2 +- 2 files changed, 31 insertions(+), 24 deletions(-) diff --git a/build.gradle b/build.gradle index 34c4c917b1..fc30cd1851 100644 --- a/build.gradle +++ b/build.gradle @@ -391,7 +391,7 @@ subprojects { subProject -> } // exclude generated java sources - by explicitly setting the base source dir checkstyleMain.source = 'src/main/java' - + // define a second checkstyle task for checking non-fatal violations task nonFatalCheckstyle(type:Checkstyle) { source = subProject.sourceSets.main.java @@ -400,31 +400,38 @@ subprojects { subProject -> configFile = rootProject.file( 'shared/config/checkstyle/checkstyle-non-fatal.xml' ) } - findbugs { - sourceSets = [ subProject.sourceSets.main, subProject.sourceSets.test ] - ignoreFailures = true - toolVersion = '3.0.1' - // for now we need to set this to low so that FindBugs will actually report the DM_CONVERT_CASE warning we care about - reportLevel = 'low' - // remove all low level bug warnings except DM_CONVERT_CASE - excludeFilterConfig=resources.text.fromString(excludeAllLowLevelBugsExcept('DM_CONVERT_CASE')) - } - - // exclude generated java sources and cfg package is a mess mainly from annotation stuff - findbugsMain.doFirst { - classes = classes.filter { - !it.path.contains( 'org/hibernate/hql/internal/antlr' ) && - !it.path.contains( 'org/hibernate/boot/jaxb/cfg/spi' ) && - !it.path.contains( 'org/hibernate/sql/ordering/antlr/Generated' ) && - !it.path.contains( 'org/hibernate/sql/ordering/antlr/OrderByTemplateTokenTypes' ) && - !it.path.contains( 'org/hibernate/boot/jaxb/hbm/spi/Jaxb' ) && - !it.path.contains( 'org/hibernate/boot/jaxb/hbm/spi/Adapter' ) && - !it.path.contains( 'org/hibernate/boot/jaxb/hbm/spi/ObjectFactory' ) && - !it.path.contains( 'org/hibernate/cfg' ) && - !it.path.contains( '_\$logger' ) + if ( JavaVersion.current().isJava9Compatible() ) { + logger.warn( '[WARN] Disabling findbugs, it does not support JDK 9' ) + findbugs { + sourceSets = [] } } + else { + findbugs { + sourceSets = [subProject.sourceSets.main, subProject.sourceSets.test] + ignoreFailures = true + toolVersion = '3.0.1' + // for now we need to set this to low so that FindBugs will actually report the DM_CONVERT_CASE warning we care about + reportLevel = 'low' + // remove all low level bug warnings except DM_CONVERT_CASE + excludeFilterConfig = resources.text.fromString( excludeAllLowLevelBugsExcept( 'DM_CONVERT_CASE' ) ) + } + // exclude generated java sources and cfg package is a mess mainly from annotation stuff + findbugsMain.doFirst { + classes = classes.filter { + !it.path.contains( 'org/hibernate/hql/internal/antlr' ) && + !it.path.contains( 'org/hibernate/boot/jaxb/cfg/spi' ) && + !it.path.contains( 'org/hibernate/sql/ordering/antlr/Generated' ) && + !it.path.contains( 'org/hibernate/sql/ordering/antlr/OrderByTemplateTokenTypes' ) && + !it.path.contains( 'org/hibernate/boot/jaxb/hbm/spi/Jaxb' ) && + !it.path.contains( 'org/hibernate/boot/jaxb/hbm/spi/Adapter' ) && + !it.path.contains( 'org/hibernate/boot/jaxb/hbm/spi/ObjectFactory' ) && + !it.path.contains( 'org/hibernate/cfg' ) && + !it.path.contains( '_\$logger' ) + } + } + } // because cfg package is a mess mainly from annotation stuff checkstyleMain.exclude '**/org/hibernate/cfg/**' checkstyleMain.exclude '**/org/hibernate/cfg/*' diff --git a/libraries.gradle b/libraries.gradle index ca982aa978..b81bd31817 100644 --- a/libraries.gradle +++ b/libraries.gradle @@ -12,7 +12,7 @@ ext { junitVersion = '4.12' // h2Version = '1.2.145' h2Version = '1.3.176' - bytemanVersion = '3.0.10' + bytemanVersion = '4.0.0-BETA5' infinispanVersion = '8.2.5.Final' jnpVersion = '5.0.6.CR1' elVersion = '2.2.4'