MINOR: Remove unnecessary log4j-appender dependency and tweak explicit log4j dependency
- Remove
log4j-appenderdependency fromtools,trogdorandshell - Remove explicit
log4jdependency fromtrogdorandtools. - Add
compileOnlydependency fromtoolstolog4j(same approach ascore).
Committer Checklist (excluded from commit message)
- [ ] Verify design and implementation
- [ ] Verify test coverage and CI build status
- [ ] Verify documentation (including upgrade notes)
@cmccabe is there any reason why shell and trogdor need log4j-appender?
@omkreddy maybe you can help review this.
@ijuma sorry missed this. Can you rebase the PR.
@omkreddy Rebased.
@ijuma can you rebase this PR? I think removing the unnecessary log4j-appender dependencies is still a good to have cleanup.
Remove log4j-appender dependency from tools, trogdor and shell
After addressing that, the distribution does not include log4j-appender jar anymore.
chia7712@ubuntu00:~/project/kafka/core/build/distributions$ ls kafka_2.13-3.9.0-SNAPSHOT/libs | grep kafka
kafka_2.13-3.9.0-SNAPSHOT.jar
kafka-clients-3.9.0-SNAPSHOT.jar
kafka-group-coordinator-3.9.0-SNAPSHOT.jar
kafka-group-coordinator-api-3.9.0-SNAPSHOT.jar
kafka-metadata-3.9.0-SNAPSHOT.jar
kafka-raft-3.9.0-SNAPSHOT.jar
kafka-server-3.9.0-SNAPSHOT.jar
kafka-server-common-3.9.0-SNAPSHOT.jar
kafka-shell-3.9.0-SNAPSHOT.jar
kafka-storage-3.9.0-SNAPSHOT.jar
kafka-storage-api-3.9.0-SNAPSHOT.jar
kafka-streams-3.9.0-SNAPSHOT.jar
kafka-streams-examples-3.9.0-SNAPSHOT.jar
kafka-streams-scala_2.13-3.9.0-SNAPSHOT.jar
kafka-streams-test-utils-3.9.0-SNAPSHOT.jar
kafka-tools-3.9.0-SNAPSHOT.jar
kafka-tools-api-3.9.0-SNAPSHOT.jar
kafka-transaction-coordinator-3.9.0-SNAPSHOT.jar
- not sure whether it is expected?
KafkaLog4jAppenderis deprecated now, but we should keep it in release? - For another, the system test
kafka_log4j_appender.pygets failed due to same reason.
Hence, we have following approaches to fix above issues.
- add
log4j-appenderdependency to core module. this can fix issue_1 and issue_2 - add
log4j-appenderdependency tocopyDependantTestLibs, and then makekafka_log4j_appender.pyexpose new classpath to include tolog4j-appenderjar. this can fix issue_2.
@ijuma WDYT? I prefer approach_1 as it keep the compatibility.