Skip to content

Commit

Permalink
fix(logging): Remove lombok as source of slf4j-api, convert to compil…
Browse files Browse the repository at this point in the history
…eOnly where possible
  • Loading branch information
david-leifker committed Dec 2, 2022
1 parent 4f7b5ac commit 61b99e6
Show file tree
Hide file tree
Showing 28 changed files with 48 additions and 18 deletions.
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ project.ext.externalDependency = [
'logbackClassic': 'ch.qos.logback:logback-classic:1.2.9',
'log4jCore': 'org.apache.logging.log4j:log4j-core:2.19.0',
'log4jApi': 'org.apache.logging.log4j:log4j-api:2.19.0',
'slf4jApi': 'org.slf4j:slf4j-api:2.0.5',
'lombok': 'org.projectlombok:lombok:1.18.12',
'mariadbConnector': 'org.mariadb.jdbc:mariadb-java-client:2.6.0',
'mavenArtifact': "org.apache.maven:maven-artifact:$mavenVersion",
Expand Down
3 changes: 2 additions & 1 deletion datahub-frontend/play.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,14 @@ dependencies {
testImplementation externalDependency.playTest
testCompile externalDependency.testng

implementation externalDependency.slf4jApi
compileOnly externalDependency.lombok
runtime externalDependency.guice
runtime (externalDependency.playDocs) {
exclude group: 'com.typesafe.akka', module: 'akka-http-core_2.12'
}
runtime externalDependency.playGuice
runtime externalDependency.logbackClassic
implementation externalDependency.logbackClassic

annotationProcessor externalDependency.lombok
}
Expand Down
1 change: 1 addition & 0 deletions datahub-graphql-core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ dependencies {
compile externalDependency.antlr4
compile externalDependency.guava

implementation externalDependency.slf4jApi
compileOnly externalDependency.lombok
annotationProcessor externalDependency.lombok

Expand Down
3 changes: 2 additions & 1 deletion datahub-upgrade/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ dependencies {
exclude group: 'com.nimbusds', module: 'nimbus-jose-jwt'
exclude group: "org.apache.htrace", module: "htrace-core4"
}
compile externalDependency.lombok
implementation externalDependency.slf4jApi
compileOnly externalDependency.lombok
compile externalDependency.picocli
compile externalDependency.parquet
compile externalDependency.springBeans
Expand Down
3 changes: 2 additions & 1 deletion entity-registry/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ dependencies {
compile spec.product.pegasus.data
compile spec.product.pegasus.generator
compile project(path: ':metadata-models')
compile externalDependency.lombok
implementation externalDependency.slf4jApi
compileOnly externalDependency.lombok
compile externalDependency.guava
compile externalDependency.jacksonDataBind
compile externalDependency.jacksonDataFormatYaml
Expand Down
4 changes: 2 additions & 2 deletions ingestion-scheduler/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ dependencies {
compile project(path: ':metadata-models')
compile project(path: ':metadata-io')
compile project(path: ':metadata-service:restli-client')
compile externalDependency.lombok
implementation externalDependency.slf4jApi
compileOnly externalDependency.lombok
annotationProcessor externalDependency.lombok

testCompile externalDependency.mockito
testCompile externalDependency.testng
testAnnotationProcessor externalDependency.lombok

constraints {
implementation(externalDependency.log4jCore) {
Expand Down
1 change: 1 addition & 0 deletions li-utils/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ dependencies {
}
compile externalDependency.guava

implementation externalDependency.slf4jApi
compileOnly externalDependency.lombok
annotationProcessor externalDependency.lombok

Expand Down
1 change: 1 addition & 0 deletions metadata-dao-impl/kafka-producer/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ dependencies {

compile externalDependency.kafkaClients

implementation externalDependency.slf4jApi
compileOnly externalDependency.lombok

annotationProcessor externalDependency.lombok
Expand Down
3 changes: 2 additions & 1 deletion metadata-integration/java/datahub-client/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ dependencies {
implementation(externalDependency.kafkaAvroSerializer) {
exclude group: "org.apache.avro"
}


implementation externalDependency.slf4jApi
compileOnly externalDependency.lombok
annotationProcessor externalDependency.lombok
testCompile externalDependency.mockito
Expand Down
1 change: 1 addition & 0 deletions metadata-integration/java/datahub-protobuf/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ dependencies {
implementation externalDependency.gson
implementation externalDependency.commonsCli

implementation externalDependency.slf4jApi
compileOnly externalDependency.lombok
annotationProcessor externalDependency.lombok
testImplementation externalDependency.junitJupiterApi
Expand Down
2 changes: 2 additions & 0 deletions metadata-integration/java/spark-lineage/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ dependencies {
force = true
} // required for org.apache.commons.io.Charsets that is used internally

implementation externalDependency.slf4jApi
compileOnly externalDependency.lombok
annotationProcessor externalDependency.lombok

Expand Down Expand Up @@ -109,6 +110,7 @@ shadowJar {
exclude('module-info.class', 'META-INF/versions/**')

relocate 'com.fasterxml.jackson', 'datahub.shaded.jackson'
relocate 'org.slf4j','datahub.shaded.org.slf4j'
relocate 'org.apache.http','datahub.spark2.shaded.http'
relocate 'org.apache.commons.codec', 'datahub.spark2.shaded.o.a.c.codec'
relocate 'org.apache.commons.compress', 'datahub.spark2.shaded.o.a.c.compress'
Expand Down
2 changes: 2 additions & 0 deletions metadata-io/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ dependencies {
compile spec.product.pegasus.generator

compile externalDependency.dgraph4j exclude group: 'com.google.guava', module: 'guava'
implementation externalDependency.slf4jApi
runtime externalDependency.logbackClassic
compileOnly externalDependency.lombok
implementation externalDependency.commonsCollections
compile externalDependency.datastaxOssNativeProtocol
Expand Down
1 change: 1 addition & 0 deletions metadata-jobs/mae-consumer/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ dependencies {
compile externalDependency.springKafka
compile externalDependency.springActuator

implementation externalDependency.slf4jApi
compileOnly externalDependency.lombok

annotationProcessor externalDependency.lombok
Expand Down
1 change: 1 addition & 0 deletions metadata-jobs/mce-consumer/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ dependencies {
compile externalDependency.springKafka
compile externalDependency.springActuator

implementation externalDependency.slf4jApi
compileOnly externalDependency.lombok

annotationProcessor externalDependency.lombok
Expand Down
1 change: 1 addition & 0 deletions metadata-jobs/pe-consumer/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ dependencies {
}
compile externalDependency.springKafka
compile externalDependency.springActuator
implementation externalDependency.slf4jApi
compileOnly externalDependency.lombok
annotationProcessor externalDependency.lombok
runtime externalDependency.logbackClassic
Expand Down
1 change: 1 addition & 0 deletions metadata-models-validator/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@ dependencies {
compile externalDependency.findbugsAnnotations
compile externalDependency.guava

implementation externalDependency.slf4jApi
compileOnly externalDependency.lombok
}
3 changes: 2 additions & 1 deletion metadata-service/auth-api/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ apply plugin: 'java'
dependencies {
compile project(path: ':metadata-models')
compile externalDependency.guava
compile externalDependency.lombok
implementation externalDependency.slf4jApi
compileOnly externalDependency.lombok
annotationProcessor externalDependency.lombok
}
3 changes: 2 additions & 1 deletion metadata-service/auth-filter/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ dependencies {
compile project(path: ':metadata-service:factories')

compile externalDependency.servletApi
compile externalDependency.lombok
implementation externalDependency.slf4jApi
compileOnly externalDependency.lombok
compile externalDependency.springWeb

annotationProcessor externalDependency.lombok
Expand Down
3 changes: 2 additions & 1 deletion metadata-service/auth-impl/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ dependencies {
runtimeOnly 'io.jsonwebtoken:jjwt-impl:0.11.2',
'io.jsonwebtoken:jjwt-jackson:0.11.2'

compile externalDependency.lombok
implementation externalDependency.slf4jApi
compileOnly externalDependency.lombok

annotationProcessor externalDependency.lombok

Expand Down
3 changes: 2 additions & 1 deletion metadata-service/auth-ranger-impl/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ dependencies {
implementation 'org.apache.logging.log4j:log4j-1.2-api:2.17.1'
implementation 'rome:rome:1.0'
runtimeOnly externalDependency.jna
compile externalDependency.lombok
implementation externalDependency.slf4jApi
compileOnly externalDependency.lombok

annotationProcessor externalDependency.lombok
testCompile externalDependency.mockito
Expand Down
3 changes: 2 additions & 1 deletion metadata-service/auth-servlet-impl/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ dependencies {
compile externalDependency.graphqlJava
compile externalDependency.springBeans
compile externalDependency.springContext
compile externalDependency.lombok
implementation externalDependency.slf4jApi
compileOnly externalDependency.lombok

annotationProcessor externalDependency.lombok
}
3 changes: 2 additions & 1 deletion metadata-service/factories/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ dependencies {
compile externalDependency.gson
compile externalDependency.kafkaClients
compile externalDependency.kafkaAvroSerde
compile externalDependency.lombok
implementation externalDependency.slf4jApi
compileOnly externalDependency.lombok
compile externalDependency.servletApi
compile externalDependency.springBeans
compile externalDependency.springBootAutoconfigure
Expand Down
3 changes: 2 additions & 1 deletion metadata-service/graphql-servlet-impl/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ dependencies {
compile externalDependency.graphqlJava
compile externalDependency.springBeans
compile externalDependency.springContext
compile externalDependency.lombok
implementation externalDependency.slf4jApi
compileOnly externalDependency.lombok

annotationProcessor externalDependency.lombok
}
6 changes: 4 additions & 2 deletions metadata-service/openapi-servlet/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@ dependencies {
compile externalDependency.springWebMVC
compile externalDependency.springBeans
compile externalDependency.springContext
compile externalDependency.lombok
compile externalDependency.antlr4
implementation externalDependency.slf4jApi
compileOnly externalDependency.lombok
implementation externalDependency.antlr4Runtime
implementation externalDependency.antlr4

annotationProcessor externalDependency.lombok

Expand Down
3 changes: 2 additions & 1 deletion metadata-service/restli-client/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ dependencies {
compile project(':metadata-events:mxe-schemas')
compile project(':metadata-utils')

compile externalDependency.lombok
implementation externalDependency.slf4jApi
compileOnly externalDependency.lombok
annotationProcessor externalDependency.lombok

compile spec.product.pegasus.restliClient
Expand Down
3 changes: 2 additions & 1 deletion metadata-service/restli-servlet-impl/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ dependencies {
compile project(':metadata-utils')
compile project(':metadata-io')
compile spec.product.pegasus.restliServer
implementation externalDependency.slf4jApi
// This is compile and not compileOnly because of restli
compile externalDependency.lombok
compile externalDependency.neo4jJavaDriver
compile externalDependency.opentelemetryAnnotations
Expand All @@ -61,7 +63,6 @@ dependencies {
modelValidation project(path: ':metadata-models-validator')
dataModel project(path: ':metadata-models', configuration: 'dataTemplate')
dataModel project(path: ':li-utils', configuration: 'dataTemplate')

}

task integrationTest(type: Test) {
Expand Down
3 changes: 2 additions & 1 deletion metadata-service/war/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ dependencies {

runtime externalDependency.awsSecretsManagerJdbc
runtime externalDependency.h2
runtime externalDependency.logbackClassic
// this is really the application and if not included in base jars for jetty should be included (not runtime)
implementation externalDependency.logbackClassic
runtime externalDependency.mariadbConnector
runtime externalDependency.mysqlConnector
runtime externalDependency.postgresql
Expand Down
1 change: 1 addition & 0 deletions metadata-utils/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ dependencies {
compile project(':metadata-events:mxe-avro-1.7')
compile project(':metadata-events:mxe-utils-avro-1.7')

implementation externalDependency.slf4jApi
compileOnly externalDependency.lombok

annotationProcessor externalDependency.lombok
Expand Down

0 comments on commit 61b99e6

Please sign in to comment.