lhotari commented on issue #11819:
URL: https://github.com/apache/pulsar/issues/11819#issuecomment-2575615197
I have also added a generic workaround for Gradle Kotlin syntax builds:
```kotlin
configurations {
all {
resolutionStrategy {
eachDependency {
if ((requested.group == "org.apache.bookkeeper" ||
requested.group == "io.streamnative") &&
requested.name in listOf("circe-checksum",
"cpu-affinity", "native-io")
) {
// Workaround for invalid metadata for Bookkeeper
dependencies which contain
// <packaging>nar</packaging> in pom.xml
artifactSelection {
selectArtifact("jar", null, null)
}
} else if (requested.name == "pulsar-client" ||
requested.name == "pulsar-client-all") {
// replace pulsar-client and pulsar-client-all with
pulsar-client-original
useTarget("${requested.group}:pulsar-client-original:${requested.version}")
} else if (requested.name == "pulsar-client-admin") {
// replace pulsar-client-admin with
pulsar-client-admin-original
useTarget("${requested.group}:pulsar-client-admin-original:${requested.version}")
}
}
}
}
}
```
this is also tested in https://github.com/lhotari/pulsar-issue-11819-repro .
Since Pulsar client dependencies aren't shaded in this case, it is necessary to
ensure that Netty dependencies are "aligned" (all using the same version) and
that a recent Netty 4.1 version is used (4.1.116.Final is most recent at the
moment). for example
```kotlin
dependencies {
implementation(platform("io.netty:netty-bom:4.1.116.Final"))
}
```
@tonisojandu-sympower Do you have a chance to test this workaround for your
use case?
--
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]