mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-09-03 04:26:12 +08:00
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:
parent
22413bdaeb
commit
784c8d2df4
@ -10,6 +10,16 @@ plugins {
|
||||
|
||||
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 {
|
||||
api(project(":spring-boot-project:spring-boot"))
|
||||
|
||||
|
@ -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 {
|
||||
|
@ -6,6 +6,16 @@ plugins {
|
||||
|
||||
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 {
|
||||
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"))
|
||||
|
Loading…
Reference in New Issue
Block a user