Avoid duplicate junit-platform.properties files caused by Kafka

Gradle doesn't support excluding a dependency that's declared with a
classifier. Instead, this commit replaces the test-qualified
kafka-server-common dependency with the plain dependency. The plain
dependency was already present so this is equivalent to excluding
the test-qualified dependency.

Closes gh-41446
This commit is contained in:
Andy Wilkinson
2024-07-11 12:17:25 +01:00
parent 22413bdaeb
commit 784c8d2df4
3 changed files with 29 additions and 0 deletions

View File

@@ -15,6 +15,15 @@ configurations {
springApplicationExample
testSlices
antoraContent
all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
if (details.requested.module.group == "org.apache.kafka" && details.requested.module.name == "kafka-server-common") {
details.artifactSelection {
selectArtifact(DependencyArtifact.DEFAULT_TYPE, null, null)
}
}
}
}
}
jar {