private Set < String > setFilterJars ( Map totalConf ) { Set < String > filterJars = new HashSet <> ( ) ; boolean enableClassLoader = ConfigExtension . isEnableTopologyClassLoader ( totalConf ) ; if ( ! enableClassLoader ) { // avoid logback vs log4j conflict boolean enableLog4j = false ; String userDefLog4jConf = ConfigExtension . getUserDefinedLog4jConf ( totalConf ) ; if ( ! StringUtils . isBlank ( userDefLog4jConf ) ) { enableLog4j = true ; } if ( enableLog4j ) { filterJars . add ( "log4j-over-slf4j" ) ; filterJars . add ( "logback-core" ) ; filterJars . add ( "logback-classic" ) ; } else { filterJars . add ( "slf4j-log4j" ) ; filterJars . add ( "log4j" ) ; } } String excludeJars = ( String ) totalConf . get ( "exclude.jars" ) ; if ( ! StringUtils . isBlank ( excludeJars ) ) { String [ ] jars = excludeJars . split ( "," ) ; for ( String jar : jars ) { filterJars . add ( jar ) ; } } LOG . info ( "Remove jars " + filterJars ) ; return filterJars ; }
filter conflict jar