This is an automated email from the ASF dual-hosted git repository.
ijuma pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/kafka.git
The following commit(s) were added to refs/heads/trunk by this push:
new 2b14a0bb6d MINOR: reload4j build dependency fixes (#12144)
2b14a0bb6d is described below
commit 2b14a0bb6dd11290d40c033c8c7ac203df72c988
Author: Ismael Juma <[email protected]>
AuthorDate: Tue May 10 20:14:21 2022 -0700
MINOR: reload4j build dependency fixes (#12144)
* Replace `log4j` with `reload4j` in `copyDependantLibs`. Since we have
some projects that have an explicit `reload4j` dependency, it
was included in the final release release tar - i.e. it was effectively
a workaround for this bug.
* Exclude `log4j` and `slf4j-log4j12` transitive dependencies for
`streams:upgrade-system-tests`. Versions 0100 and 0101
had a transitive dependency to `log4j` and `slf4j-log4j12` via
`zkclient` and `zookeeper`. This avoids classpath conflicts that lead
to [NoSuchFieldError](https://github.com/qos-ch/reload4j/issues/41) in
system tests.
Reviewers: Jason Gustafson <[email protected]>
---
build.gradle | 32 +++++++++++++++++++-------------
1 file changed, 19 insertions(+), 13 deletions(-)
diff --git a/build.gradle b/build.gradle
index 68dbbf513d..b80de61385 100644
--- a/build.gradle
+++ b/build.gradle
@@ -922,7 +922,7 @@ project(':core') {
tasks.create(name: "copyDependantLibs", type: Copy) {
from (configurations.testRuntimeClasspath) {
include('slf4j-log4j12*')
- include('log4j*jar')
+ include('reload4j*jar')
}
from (configurations.runtimeClasspath) {
exclude('kafka-clients*')
@@ -1701,7 +1701,7 @@ project(':tools') {
tasks.create(name: "copyDependantLibs", type: Copy) {
from (configurations.testRuntimeClasspath) {
include('slf4j-log4j12*')
- include('log4j*jar')
+ include('reload4j*jar')
}
from (configurations.runtimeClasspath) {
exclude('kafka-clients*')
@@ -1751,7 +1751,7 @@ project(':trogdor') {
tasks.create(name: "copyDependantLibs", type: Copy) {
from (configurations.testRuntimeClasspath) {
include('slf4j-log4j12*')
- include('log4j*jar')
+ include('reload4j*jar')
}
from (configurations.runtimeClasspath) {
exclude('kafka-clients*')
@@ -2071,7 +2071,10 @@ project(':streams:upgrade-system-tests-0100') {
archivesBaseName = "kafka-streams-upgrade-system-tests-0100"
dependencies {
- testImplementation libs.kafkaStreams_0100
+ testImplementation(libs.kafkaStreams_0100) {
+ exclude group: 'org.slf4j', module: 'slf4j-log4j12'
+ exclude group: 'log4j', module: 'log4j'
+ }
testRuntimeOnly libs.junitJupiter
}
@@ -2084,7 +2087,10 @@ project(':streams:upgrade-system-tests-0101') {
archivesBaseName = "kafka-streams-upgrade-system-tests-0101"
dependencies {
- testImplementation libs.kafkaStreams_0101
+ testImplementation(libs.kafkaStreams_0101) {
+ exclude group: 'org.slf4j', module: 'slf4j-log4j12'
+ exclude group: 'log4j', module: 'log4j'
+ }
testRuntimeOnly libs.junitJupiter
}
@@ -2391,7 +2397,7 @@ project(':connect:api') {
tasks.create(name: "copyDependantLibs", type: Copy) {
from (configurations.testRuntimeClasspath) {
include('slf4j-log4j12*')
- include('log4j*jar')
+ include('reload4j*jar')
}
from (configurations.runtimeClasspath) {
exclude('kafka-clients*')
@@ -2428,7 +2434,7 @@ project(':connect:transforms') {
tasks.create(name: "copyDependantLibs", type: Copy) {
from (configurations.testRuntimeClasspath) {
include('slf4j-log4j12*')
- include('log4j*jar')
+ include('reload4j*jar')
}
from (configurations.runtimeClasspath) {
exclude('kafka-clients*')
@@ -2468,7 +2474,7 @@ project(':connect:json') {
tasks.create(name: "copyDependantLibs", type: Copy) {
from (configurations.testRuntimeClasspath) {
include('slf4j-log4j12*')
- include('log4j*jar')
+ include('reload4j*jar')
}
from (configurations.runtimeClasspath) {
exclude('kafka-clients*')
@@ -2534,8 +2540,8 @@ project(':connect:runtime') {
tasks.create(name: "copyDependantLibs", type: Copy) {
from (configurations.testRuntimeClasspath) {
+ // No need to copy log4j since the module has an explicit dependency on
that
include('slf4j-log4j12*')
- include('log4j*jar')
}
from (configurations.runtimeClasspath) {
exclude('kafka-clients*')
@@ -2614,7 +2620,7 @@ project(':connect:file') {
tasks.create(name: "copyDependantLibs", type: Copy) {
from (configurations.testRuntimeClasspath) {
include('slf4j-log4j12*')
- include('log4j*jar')
+ include('reload4j*jar')
}
from (configurations.runtimeClasspath) {
exclude('kafka-clients*')
@@ -2653,7 +2659,7 @@ project(':connect:basic-auth-extension') {
tasks.create(name: "copyDependantLibs", type: Copy) {
from (configurations.testRuntimeClasspath) {
include('slf4j-log4j12*')
- include('log4j*jar')
+ include('reload4j*jar')
}
from (configurations.runtimeClasspath) {
exclude('kafka-clients*')
@@ -2700,7 +2706,7 @@ project(':connect:mirror') {
tasks.create(name: "copyDependantLibs", type: Copy) {
from (configurations.testRuntimeClasspath) {
include('slf4j-log4j12*')
- include('log4j*jar')
+ include('reload4j*jar')
}
from (configurations.runtimeClasspath) {
exclude('kafka-clients*')
@@ -2735,7 +2741,7 @@ project(':connect:mirror-client') {
tasks.create(name: "copyDependantLibs", type: Copy) {
from (configurations.testRuntimeClasspath) {
include('slf4j-log4j12*')
- include('log4j*jar')
+ include('reload4j*jar')
}
from (configurations.runtimeClasspath) {
exclude('kafka-clients*')