HHH-112001 - upgrade Byteman version and disable findbugs for JDK 9

This commit is contained in:
Andrea Boriero 2017-09-21 20:59:05 +01:00 committed by Sanne Grinovero
parent 132767b4fb
commit 81f4ab8f06
2 changed files with 31 additions and 24 deletions

View File

@ -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/*'

View File

@ -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'