Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
KAFKA-16359: Corrected manifest file for kafka-clients (apache#15532)
The issue KAFKA-16359 reported inclusion of kafka-clients runtime dependencies in MANIFEST.MF Class-Path. The root cause is the issue defined here with the usage of shadow plugin. Looking into the specifics of plugin and documentation, specifies that any dependency marked as shadow will be treated as following by the shadow plugin: 1. Adds the dependency as runtime dependency in resultant pom.xml - code here 2. Adds the dependency as Class-Path in MANIFEST.MF as well - code here Resolution We do need the runtime dependencies available in the pom (1 above) but not on manifest (2 above). Also there is no clear way to separate the behaviour as both above tasks relies on shadow configuration. To fix, I have defined another custom configuration named shadowed which is later used to populate the correct pom (the code is similar to what shadow plugin does to populate pom for runtime dependencies). Though this might seem like a workaround, but I think that's the only way to fix the issue. I have checked other SDKs which suffered with same issue and went with similar route to populate pom. Reviewers: Luke Chen <[email protected]>, Reviewers: Mickael Maison <[email protected]>, Gaurav Narula <[email protected]>
- Loading branch information