This is an automated email from the ASF dual-hosted git repository. jshao pushed a commit to branch branch-0.8 in repository https://gitbox.apache.org/repos/asf/gravitino.git
The following commit(s) were added to refs/heads/branch-0.8 by this push: new b19506c6c [#6307] feat(flink): remove log4j from Gravitino Flink connector (#6317) b19506c6c is described below commit b19506c6c9d7e98032340cd463f71a31ad37531c Author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> AuthorDate: Fri Jan 17 17:09:21 2025 +0800 [#6307] feat(flink): remove log4j from Gravitino Flink connector (#6317) ### What changes were proposed in this pull request? remove log4j from Gravitino Flink connector ### Why are the changes needed? Fix: #6307 ### Does this PR introduce _any_ user-facing change? no ### How was this patch tested? setup an local flink cluster, run flink SQL Co-authored-by: FANNG <xiaoj...@datastrato.com> --- flink-connector/flink-runtime/build.gradle.kts | 8 ++++++++ flink-connector/flink/build.gradle.kts | 8 ++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/flink-connector/flink-runtime/build.gradle.kts b/flink-connector/flink-runtime/build.gradle.kts index 1a7164644..0ac393ded 100644 --- a/flink-connector/flink-runtime/build.gradle.kts +++ b/flink-connector/flink-runtime/build.gradle.kts @@ -41,6 +41,14 @@ val scalaVersion: String = "2.12" val artifactName = "gravitino-${project.name}_$scalaVersion" val baseName = "${rootProject.name}-flink-connector-runtime-${flinkMajorVersion}_$scalaVersion" +configurations.all { + resolutionStrategy.eachDependency { + if (requested.group == "org.apache.logging.log4j") { + throw GradleException("Forbidden dependency 'org.apache.logging.log4j' found!") + } + } +} + dependencies { implementation(project(":clients:client-java-runtime", configuration = "shadow")) implementation(project(":flink-connector:flink")) diff --git a/flink-connector/flink/build.gradle.kts b/flink-connector/flink/build.gradle.kts index 4c9bd036a..6cbfbfa53 100644 --- a/flink-connector/flink/build.gradle.kts +++ b/flink-connector/flink/build.gradle.kts @@ -41,8 +41,12 @@ val scalaVersion: String = "2.12" val artifactName = "${rootProject.name}-flink-${flinkMajorVersion}_$scalaVersion" dependencies { - implementation(project(":core")) - implementation(project(":catalogs:catalog-common")) + implementation(project(":core")) { + exclude("org.apache.logging.log4j") + } + implementation(project(":catalogs:catalog-common")) { + exclude("org.apache.logging.log4j") + } implementation(libs.guava) compileOnly(project(":clients:client-java-runtime", configuration = "shadow"))