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:
@@ -10,6 +10,16 @@ plugins {
|
|||||||
|
|
||||||
description = "Spring Boot AutoConfigure"
|
description = "Spring Boot AutoConfigure"
|
||||||
|
|
||||||
|
configurations.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)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
api(project(":spring-boot-project:spring-boot"))
|
api(project(":spring-boot-project:spring-boot"))
|
||||||
|
|
||||||
|
|||||||
@@ -15,6 +15,15 @@ configurations {
|
|||||||
springApplicationExample
|
springApplicationExample
|
||||||
testSlices
|
testSlices
|
||||||
antoraContent
|
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 {
|
jar {
|
||||||
|
|||||||
@@ -6,6 +6,16 @@ plugins {
|
|||||||
|
|
||||||
description = "Spring Boot Kafka smoke test"
|
description = "Spring Boot Kafka smoke test"
|
||||||
|
|
||||||
|
configurations.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)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
dockerTestImplementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-test"))
|
dockerTestImplementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-test"))
|
||||||
dockerTestImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support-docker"))
|
dockerTestImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support-docker"))
|
||||||
|
|||||||
Reference in New Issue
Block a user