apoorvmittal10 commented on code in PR #15281: URL: https://github.com/apache/kafka/pull/15281#discussion_r1471544504
########## 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: Yes @ijuma, I have mostly read the documentation multiple times but do not get the complex behaviour addressed properly. We do already set the archiveClassifier [here](https://github.com/apache/kafka/blob/9e4a4a28218b8803a6f41b65e19a94268035ccf5/build.gradle#L1485) and archiveBaseName [here](https://github.com/apache/kafka/blob/9e4a4a28218b8803a6f41b65e19a94268035ccf5/build.gradle#L1422), I have also tried setting the `archiveBaseName` inside `shadowJar` definition but it doesn't work with `maven-publication`. -- 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