apoorvmittal10 commented on code in PR #15281:
URL: https://github.com/apache/kafka/pull/15281#discussion_r1471432221


##########
build.gradle:
##########
@@ -303,6 +303,20 @@ subprojects {
           } else {
             apply plugin: 'com.github.johnrengelman.shadow'
             artifact shadowJar
+            // work around issue with 'shadow' to resolve runtime dependencies 
correctly. This requires
+            // any project relying on 'shadow' dependencies.
+            afterEvaluate {
+              pom.withXml { xml ->
+                def dependenciesNode = xml.asNode().appendNode('dependencies')
+                project.configurations.shadow.allDependencies.each {
+                  def dependencyNode = 
dependenciesNode.appendNode('dependency')
+                  dependencyNode.appendNode('groupId', it.group)
+                  dependencyNode.appendNode('artifactId', it.name)
+                  dependencyNode.appendNode('version', it.version)
+                  dependencyNode.appendNode('scope', 'runtime')

Review Comment:
   I do agree @ijuma but I do find a limitation working with `shadowJar` and 
the project name different than the `artifacts` (`clients` and the 
artifact`kafka-clients`) which restricts using 
`project.shadow.component(mavenJava)` as signing during release breaks because 
the `asc` files cannot be resolved by the  publishing plugin. @xvrl can you 
please look into the PR and suggest if there could be a better way and also to 
include gradle metadata for kafka-clients?



-- 
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