Apply dependency management to selected modules
This commit applies the Dependency Management Plugin to modules that require it; right now Spring Framework is importing BOMs for Netty and Reactor dependencies only. Instead of applying those BOMs to all modules, they're applied only where they're needed. Issue: SPR-15885
This commit is contained in:
parent
2eeb428e95
commit
cc3d7d2d48
19
build.gradle
19
build.gradle
|
@ -90,13 +90,6 @@ configure(allprojects) { project ->
|
|||
configurations.all {
|
||||
// Check for updates every build
|
||||
resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
|
||||
|
||||
// Consistent netty version (e.g. clashes between netty-all vs netty-common)
|
||||
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
|
||||
if (details.requested.group == 'io.netty') {
|
||||
details.useVersion nettyVersion
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
compileJava.options*.compilerArgs = [
|
||||
|
@ -185,18 +178,6 @@ configure(allprojects) { project ->
|
|||
|
||||
configure(subprojects - project(":spring-build-src")) { subproject ->
|
||||
apply from: "${gradleScriptDir}/publish-maven.gradle"
|
||||
apply plugin: "io.spring.dependency-management"
|
||||
|
||||
dependencyManagement {
|
||||
imports {
|
||||
mavenBom "io.projectreactor:reactor-bom:${reactorVersion}"
|
||||
mavenBom "io.netty:netty-bom:${nettyVersion}"
|
||||
}
|
||||
resolutionStrategy {
|
||||
cacheChangingModulesFor 0, 'seconds'
|
||||
}
|
||||
applyMavenExclusions = false
|
||||
}
|
||||
|
||||
configurations {
|
||||
jacoco
|
||||
|
|
|
@ -1,5 +1,18 @@
|
|||
description = "Spring Core"
|
||||
|
||||
apply plugin: "io.spring.dependency-management"
|
||||
|
||||
dependencyManagement {
|
||||
imports {
|
||||
mavenBom "io.projectreactor:reactor-bom:${reactorVersion}"
|
||||
mavenBom "io.netty:netty-bom:${nettyVersion}"
|
||||
}
|
||||
resolutionStrategy {
|
||||
cacheChangingModulesFor 0, 'seconds'
|
||||
}
|
||||
applyMavenExclusions = false
|
||||
}
|
||||
|
||||
// As of Spring 4.0.3, spring-core includes asm 5.x and repackages cglib 3.2, inlining
|
||||
// both into the spring-core jar. cglib 3.2 itself depends on asm 5.x and is therefore
|
||||
// further transformed by the JarJar task to depend on org.springframework.asm; this
|
||||
|
|
|
@ -1,5 +1,18 @@
|
|||
description = "Spring Messaging"
|
||||
|
||||
apply plugin: "io.spring.dependency-management"
|
||||
|
||||
dependencyManagement {
|
||||
imports {
|
||||
mavenBom "io.projectreactor:reactor-bom:${reactorVersion}"
|
||||
mavenBom "io.netty:netty-bom:${nettyVersion}"
|
||||
}
|
||||
resolutionStrategy {
|
||||
cacheChangingModulesFor 0, 'seconds'
|
||||
}
|
||||
applyMavenExclusions = false
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile(project(":spring-beans"))
|
||||
compile(project(":spring-core"))
|
||||
|
|
|
@ -1,5 +1,18 @@
|
|||
description = "Spring TestContext Framework"
|
||||
|
||||
apply plugin: "io.spring.dependency-management"
|
||||
|
||||
dependencyManagement {
|
||||
imports {
|
||||
mavenBom "io.projectreactor:reactor-bom:${reactorVersion}"
|
||||
mavenBom "io.netty:netty-bom:${nettyVersion}"
|
||||
}
|
||||
resolutionStrategy {
|
||||
cacheChangingModulesFor 0, 'seconds'
|
||||
}
|
||||
applyMavenExclusions = false
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile(project(":spring-core"))
|
||||
optional(project(":spring-aop"))
|
||||
|
|
|
@ -1,6 +1,18 @@
|
|||
description = "Spring Web"
|
||||
|
||||
apply plugin: "groovy"
|
||||
apply plugin: "io.spring.dependency-management"
|
||||
|
||||
dependencyManagement {
|
||||
imports {
|
||||
mavenBom "io.projectreactor:reactor-bom:${reactorVersion}"
|
||||
mavenBom "io.netty:netty-bom:${nettyVersion}"
|
||||
}
|
||||
resolutionStrategy {
|
||||
cacheChangingModulesFor 0, 'seconds'
|
||||
}
|
||||
applyMavenExclusions = false
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile(project(":spring-beans"))
|
||||
|
|
|
@ -1,5 +1,18 @@
|
|||
description = "Spring WebFlux"
|
||||
|
||||
apply plugin: "io.spring.dependency-management"
|
||||
|
||||
dependencyManagement {
|
||||
imports {
|
||||
mavenBom "io.projectreactor:reactor-bom:${reactorVersion}"
|
||||
mavenBom "io.netty:netty-bom:${nettyVersion}"
|
||||
}
|
||||
resolutionStrategy {
|
||||
cacheChangingModulesFor 0, 'seconds'
|
||||
}
|
||||
applyMavenExclusions = false
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile(project(":spring-beans"))
|
||||
compile(project(":spring-core"))
|
||||
|
|
|
@ -1,5 +1,17 @@
|
|||
description = "Spring Web MVC"
|
||||
|
||||
apply plugin: "io.spring.dependency-management"
|
||||
|
||||
dependencyManagement {
|
||||
imports {
|
||||
mavenBom "io.projectreactor:reactor-bom:${reactorVersion}"
|
||||
}
|
||||
resolutionStrategy {
|
||||
cacheChangingModulesFor 0, 'seconds'
|
||||
}
|
||||
applyMavenExclusions = false
|
||||
}
|
||||
|
||||
dependencies {
|
||||
provided("javax.servlet:javax.servlet-api:4.0.0")
|
||||
compile(project(":spring-aop"))
|
||||
|
|
|
@ -1,5 +1,18 @@
|
|||
description = "Spring WebSocket"
|
||||
|
||||
apply plugin: "io.spring.dependency-management"
|
||||
|
||||
dependencyManagement {
|
||||
imports {
|
||||
mavenBom "io.projectreactor:reactor-bom:${reactorVersion}"
|
||||
mavenBom "io.netty:netty-bom:${nettyVersion}"
|
||||
}
|
||||
resolutionStrategy {
|
||||
cacheChangingModulesFor 0, 'seconds'
|
||||
}
|
||||
applyMavenExclusions = false
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile(project(":spring-context"))
|
||||
compile(project(":spring-core"))
|
||||
|
|
Loading…
Reference in New Issue