chia7712 commented on code in PR #16559:
URL: https://github.com/apache/kafka/pull/16559#discussion_r1671735173


##########
build.gradle:
##########
@@ -933,6 +933,8 @@ project(':core') {
     implementation project(':raft')
     implementation project(':storage')
     implementation project(':server')
+    // added in order to pass the kafka_log4j_appender.py test
+    implementation project(':log4j-appender')

Review Comment:
   the solution_2, for example, looks like this:
   ```py
           core_dependant_test_libs_jar = 
self.path.jar(CORE_DEPENDANT_TEST_LIBS_JAR_NAME, DEV_BRANCH)
           cmd = fix_opts_for_new_jvm(node)
           cmd += "for file in %s; do CLASSPATH=$CLASSPATH:$file; done;" % 
core_dependant_test_libs_jar
           cmd += " export CLASSPATH;"
           cmd += self.path.script("kafka-run-class.sh", node)
   ```
   
https://github.com/apache/kafka/blob/trunk/tests/kafkatest/services/kafka_log4j_appender.py#L51
   
   ```gradle
     tasks.create(name: "copyDependantTestLibs", type: Copy) {
       from (configurations.testRuntimeClasspath) {
         include('*.jar')
       }
       into "$buildDir/dependant-testlibs"
       //By default gradle does not handle test dependencies between the 
sub-projects
       //This line is to include clients project test jar to dependant-testlibs
       from (project(':clients').testJar ) { "$buildDir/dependant-testlibs" }
       from (project(':log4j-appender').jar ) { "$buildDir/dependant-testlibs" }
       duplicatesStrategy 'exclude'
     }
   ```
   https://github.com/apache/kafka/blob/trunk/build.gradle#L1213



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to