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


##########
build.gradle:
##########
@@ -1326,6 +1326,42 @@ project(':core') {
     from(project(':tools:tools-api').jar) { into("libs/") }
     from(project(':tools:tools-api').configurations.runtimeClasspath) { 
into("libs/") }
     duplicatesStrategy 'exclude'
+
+    doLast {
+      def prefixPath = "$rootDir/core/build/distributions/"
+      def bathPath = prefixPath + 
"kafka_${versions.baseScala}-${project.properties['version']}"
+      def tgzPath = bathPath  + '.tgz'
+      exec {
+        commandLine 'tar', 'xzf', tgzPath, '-C', prefixPath
+      }
+
+      def licenseFile = file(bathPath + '/LICENSE')
+      def libsDir = file(bathPath + '/libs')
+      def result = true
+      libsDir.eachFile { file ->
+        if (file.name.endsWith('.jar')
+                && !file.name.startsWith('kafka')
+                && !file.name.startsWith('connect')
+                && !file.name.startsWith('trogdor')) {
+
+          def isLicensePresent = false
+          licenseFile.eachLine { line ->
+            if (line.contains(file.name - '.jar')) {
+              isLicensePresent = true
+            }
+          }
+          if (!isLicensePresent) {
+            println "warning: ${file.name} is missing in the license file"

Review Comment:
   Can we find out the license which is in the license file but is not in 
distribution?



-- 
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: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to