-
Notifications
You must be signed in to change notification settings - Fork 14.7k
KAFKA-18466: Remove log4j-1.2-api from runtime scope while keeping it in distribution package #18472
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@frankvicky please build the distribution and Pom file and then check the content, thanks! |
e4d37ae to
e0272f6
Compare
|
Similarly to apache/eventmesh#4700, I think that:
|
|
I totally agree @ppkarwasz's suggestion. Additionally, |
+1
Gradle apparently has a feature for that, see Optional dependencies are not optional. With a snippet like: java {
registerFeature('loggingConfig') {
usingSourceSet(sourceSets.main)
}
}it should be possible to:
|
e0272f6 to
eb55146
Compare
|
Hi @ppkarwasz, Should we make I'm running the kafka e2e on my local machine, it would fail with following log: It seems we still need |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems we still need log4j-slf4j-impl at runtime. WDYT ?
please add the log4jRuntimeLibs to copyDependantLibs too. Our docker e2e depends on systemTestLibs task by default, and the task copies the dependencies to dependant-testlibs folder
build.gradle
Outdated
| } | ||
|
|
||
| dependencies { | ||
| loggingImplementation log4j2Libs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think only core and connect-runtime needs to add log4j2Libs to compileOnly scope.
eb55146 to
68bc81c
Compare
68bc81c to
07ec3ea
Compare
… in distribution package
07ec3ea to
af1a063
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
test the latest commit on my local.
chia7712@chia7712-ubuntu:~$ cat ~/.m2/repository/org/apache/kafka/kafka_2.13/4.1.0-SNAPSHOT/kafka_2.13-4.1.0-SNAPSHOT.pom | grep log4j
chia7712@chia7712-ubuntu:~$
chia7712@chia7712-ubuntu:~$ cat ~/.m2/repository/org/apache/kafka/kafka-clients/4.1.0-SNAPSHOT/kafka-clients-4.1.0-SNAPSHOT.pom | grep log4j
chia7712@chia7712-ubuntu:~$ cat ~/.m2/repository/org/apache/kafka/kafka-clients/4.1.0-SNAPSHOT/kafka-clients-4.1.0-SNAPSHOT.pom | grep slf4j
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
chia7712@chia7712-ubuntu:~$ cat ~/.m2/repository/org/apache/kafka/kafka-streams/4.1.0-SNAPSHOT/kafka-streams-4.1.0-SNAPSHOT.pom | grep log4j
chia7712@chia7712-ubuntu:~$ cat ~/.m2/repository/org/apache/kafka/kafka-streams/4.1.0-SNAPSHOT/kafka-streams-4.1.0-SNAPSHOT.pom | grep slf4j
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
|
@ppkarwasz we don't use the Gradle’s feature variants in this PR due to following reasons.
I will merge this PR to fix the issue reported by @trnguyencflt, but please feel free to leave suggestions as follow-up, thanks! |
…in distribution package (#18472) Reviewers: Chia-Ping Tsai <[email protected]>
The PR looks good to me now. For a POM file having |
|
thanks all for the quick fix 👍 |
…in distribution package (apache#18472) Reviewers: Chia-Ping Tsai <[email protected]>
…in distribution package (apache#18472) Reviewers: Chia-Ping Tsai <[email protected]>
…in distribution package (apache#18472) Reviewers: Chia-Ping Tsai <[email protected]>







JIRA: KAFKA-18466
This PR is a patch for #17373 (comment)
Committer Checklist (excluded from commit message)