Use Spring dependency management plugin
This commit introduces the Spring dependency management Gradle plugin. All dependency versions and BOMs are now managed in the root project and declared in the modules directly.
This commit is contained in:
committed by
Rossen Stoyanchev
parent
e944eec255
commit
2f2c2e0313
121
build.gradle
121
build.gradle
@@ -9,14 +9,84 @@ buildscript {
|
||||
}
|
||||
}
|
||||
|
||||
allprojects {
|
||||
plugins {
|
||||
id 'io.spring.dependency-management' version '1.0.9.RELEASE' apply false
|
||||
}
|
||||
|
||||
ext {
|
||||
moduleProjects = subprojects.findAll { it.name.startsWith("spring-") }
|
||||
javaProjects = subprojects - project("spring-js-resources")
|
||||
withoutJclOverSlf4j = {
|
||||
exclude group: "org.slf4j", name: "jcl-over-slf4j"
|
||||
}
|
||||
}
|
||||
|
||||
allprojects {
|
||||
group = "org.springframework.webflow"
|
||||
|
||||
apply plugin: "io.spring.dependency-management"
|
||||
apply plugin: "propdeps"
|
||||
apply plugin: "java"
|
||||
apply from: "${rootProject.projectDir}/ide.gradle"
|
||||
|
||||
dependencyManagement {
|
||||
imports {
|
||||
mavenBom "org.springframework:spring-framework-bom:5.2.6.RELEASE"
|
||||
mavenBom "org.springframework.security:spring-security-bom:5.3.1.RELEASE"
|
||||
mavenBom "org.junit:junit-bom:5.6.2"
|
||||
}
|
||||
dependencies {
|
||||
dependency "javax.servlet:javax.servlet-api:3.1.0"
|
||||
dependency "javax.servlet:jstl:1.2"
|
||||
dependency "javax.servlet.jsp:javax.servlet.jsp-api:2.3.2-b02"
|
||||
dependency "javax.el:javax.el-api:3.0.1-b06"
|
||||
dependency "javax.validation:validation-api:2.0.1.Final"
|
||||
dependencySet(group: 'org.hibernate', version: '5.4.14.Final') {
|
||||
entry 'hibernate-core'
|
||||
entry 'hibernate-entitymanager'
|
||||
}
|
||||
dependency "org.hibernate:hibernate-validator:6.1.4.Final"
|
||||
dependencySet(group: 'com.sun.faces', version: '2.2.16') {
|
||||
entry 'jsf-api'
|
||||
entry 'jsf-impl'
|
||||
}
|
||||
dependencySet(group: 'org.apache.tiles', version: '3.0.8') {
|
||||
entry 'tiles-api'
|
||||
entry('tiles-core', withoutJclOverSlf4j)
|
||||
entry('tiles-servlet', withoutJclOverSlf4j)
|
||||
entry('tiles-jsp', withoutJclOverSlf4j)
|
||||
entry('tiles-el', withoutJclOverSlf4j)
|
||||
entry('tiles-extras') {
|
||||
exclude group: "org.springframework", name: "spring-web"
|
||||
}
|
||||
}
|
||||
dependency "org.apache.myfaces.core:myfaces-impl:2.2.12"
|
||||
dependency "com.sun.facelets:jsf-facelets:1.1.14"
|
||||
dependency "org.hsqldb:hsqldb:2.5.0"
|
||||
|
||||
dependencySet(group: 'org.apache.logging.log4j', version: '2.13.2') {
|
||||
entry 'log4j-api'
|
||||
entry 'log4j-core'
|
||||
entry 'log4j-slf4j-impl'
|
||||
entry 'log4j-jul'
|
||||
}
|
||||
dependency "org.slf4j:slf4j-api:1.7.30"
|
||||
|
||||
dependency("junit:junit:4.13") {
|
||||
exclude group: "org.hamcrest", name: "hamcrest-core"
|
||||
}
|
||||
dependency "org.easymock:easymock:4.2"
|
||||
dependency "org.hamcrest:hamcrest:2.1"
|
||||
dependency "org.apache.tomcat:tomcat-jasper-el:9.0.34"
|
||||
dependency "org.apache.myfaces.test:myfaces-test22:1.0.8"
|
||||
}
|
||||
generatedPomCustomization {
|
||||
enabled = false
|
||||
}
|
||||
resolutionStrategy {
|
||||
cacheChangingModulesFor 0, "seconds"
|
||||
}
|
||||
}
|
||||
repositories {
|
||||
mavenCentral()
|
||||
if (!version.endsWith('RELEASE')) {
|
||||
@@ -26,6 +96,13 @@ allprojects {
|
||||
maven { url "https://repo.spring.io/snapshot" }
|
||||
}
|
||||
}
|
||||
configurations.all {
|
||||
resolutionStrategy {
|
||||
cacheChangingModulesFor 0, "seconds"
|
||||
cacheDynamicVersionsFor 0, "seconds"
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
subprojects { subproject ->
|
||||
@@ -52,47 +129,7 @@ subprojects { subproject ->
|
||||
}
|
||||
}
|
||||
|
||||
configure(subprojects.findAll {
|
||||
it.name != "spring-build-src" && it.name != "spring-js-resources"}) { subproject ->
|
||||
|
||||
subproject.ext {
|
||||
springVersion = "5.2.6.RELEASE"
|
||||
springSecurityVersion = "5.3.1.RELEASE"
|
||||
servletVersion = "3.1.0"
|
||||
hibernate5Version = "5.4.14.Final"
|
||||
tiles3Version = "3.0.8"
|
||||
log4jVersion = "2.13.2"
|
||||
junit5Version = "5.6.2"
|
||||
}
|
||||
|
||||
configurations.all {
|
||||
// Check for updates every build
|
||||
resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
|
||||
|
||||
// Consistent slf4j version (e.g. clashes between slf4j versions)
|
||||
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
|
||||
if (details.requested.group == 'org.slf4j') {
|
||||
details.useVersion "1.7.25"
|
||||
}
|
||||
}
|
||||
|
||||
exclude group: "org.slf4j", module: "jcl-over-slf4j"
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile("org.springframework:spring-beans:$springVersion")
|
||||
compile("org.springframework:spring-context:$springVersion")
|
||||
compile("org.springframework:spring-core:$springVersion")
|
||||
compile("org.springframework:spring-expression:$springVersion")
|
||||
compileOnly("javax.el:javax.el-api:3.0.1-b06")
|
||||
testCompile("org.junit.jupiter:junit-jupiter:${junit5Version}")
|
||||
testCompile("org.hamcrest:hamcrest-all:1.3")
|
||||
testCompile("org.easymock:easymock:4.2")
|
||||
testCompile("org.apache.tomcat:tomcat-jasper-el:9.0.34")
|
||||
testRuntime("org.apache.logging.log4j:log4j-core:${log4jVersion}")
|
||||
testRuntime("org.apache.logging.log4j:log4j-slf4j-impl:${log4jVersion}")
|
||||
testRuntime("org.apache.logging.log4j:log4j-jul:${log4jVersion}")
|
||||
}
|
||||
configure(javaProjects) { javaProject ->
|
||||
|
||||
test {
|
||||
useJUnitPlatform()
|
||||
|
||||
@@ -1 +1,14 @@
|
||||
description = "Spring Binding"
|
||||
description = "Spring Binding"
|
||||
|
||||
dependencies {
|
||||
compile("org.springframework:spring-context")
|
||||
|
||||
compileOnly("javax.el:javax.el-api")
|
||||
testCompile("org.junit.jupiter:junit-jupiter")
|
||||
testCompile("org.hamcrest:hamcrest")
|
||||
testCompile("org.easymock:easymock")
|
||||
testCompile("org.apache.tomcat:tomcat-jasper-el")
|
||||
testRuntime("org.apache.logging.log4j:log4j-core")
|
||||
testRuntime("org.apache.logging.log4j:log4j-slf4j-impl")
|
||||
testRuntime("org.apache.logging.log4j:log4j-jul")
|
||||
}
|
||||
@@ -3,16 +3,23 @@ description = "Spring Faces"
|
||||
dependencies {
|
||||
compile(project(":spring-binding"))
|
||||
compile(project(":spring-webflow"))
|
||||
compile("org.springframework:spring-web:$springVersion")
|
||||
compile("org.springframework:spring-webmvc:$springVersion")
|
||||
provided("javax.servlet:javax.servlet-api:$servletVersion")
|
||||
provided("com.sun.faces:jsf-api:2.2.16")
|
||||
provided("com.sun.faces:jsf-impl:2.2.16")
|
||||
provided("org.apache.myfaces.core:myfaces-impl:2.2.12")
|
||||
optional("com.sun.facelets:jsf-facelets:1.1.14")
|
||||
optional("org.springframework.security:spring-security-core:$springSecurityVersion")
|
||||
optional("org.springframework.security:spring-security-web:$springSecurityVersion")
|
||||
optional("org.springframework.security:spring-security-taglibs:$springSecurityVersion")
|
||||
testCompile("org.apache.myfaces.test:myfaces-test22:1.0.8")
|
||||
testCompile("org.springframework:spring-test:$springVersion")
|
||||
compile("org.springframework:spring-web")
|
||||
compile("org.springframework:spring-webmvc")
|
||||
compileOnly("javax.el:javax.el-api")
|
||||
provided("javax.servlet:javax.servlet-api")
|
||||
provided("com.sun.faces:jsf-api")
|
||||
provided("com.sun.faces:jsf-impl")
|
||||
provided("org.apache.myfaces.core:myfaces-impl")
|
||||
optional("com.sun.facelets:jsf-facelets")
|
||||
optional("org.springframework.security:spring-security-core")
|
||||
optional("org.springframework.security:spring-security-web")
|
||||
optional("org.springframework.security:spring-security-taglibs")
|
||||
testCompile("org.junit.jupiter:junit-jupiter")
|
||||
testCompile("org.easymock:easymock")
|
||||
testCompile("org.apache.myfaces.test:myfaces-test22")
|
||||
testCompile("org.apache.tomcat:tomcat-jasper-el")
|
||||
testCompile("org.springframework:spring-test")
|
||||
testRuntime("org.apache.logging.log4j:log4j-core")
|
||||
testRuntime("org.apache.logging.log4j:log4j-slf4j-impl")
|
||||
testRuntime("org.apache.logging.log4j:log4j-jul")
|
||||
}
|
||||
|
||||
@@ -2,29 +2,34 @@ description = "Spring Web Flow"
|
||||
|
||||
dependencies {
|
||||
compile(project(":spring-binding"))
|
||||
compile("org.springframework:spring-web:$springVersion")
|
||||
compile("org.springframework:spring-webmvc:$springVersion")
|
||||
provided("javax.servlet:javax.servlet-api:$servletVersion")
|
||||
optional("org.hibernate:hibernate-core:$hibernate5Version")
|
||||
optional("org.springframework.security:spring-security-core:$springSecurityVersion")
|
||||
optional("org.springframework:spring-orm:$springVersion")
|
||||
optional("org.springframework:spring-tx:$springVersion")
|
||||
optional("org.apache.tiles:tiles-api:$tiles3Version")
|
||||
optional("org.apache.tiles:tiles-core:$tiles3Version")
|
||||
optional("org.apache.tiles:tiles-servlet:$tiles3Version")
|
||||
optional("org.apache.tiles:tiles-jsp:$tiles3Version")
|
||||
optional("org.apache.tiles:tiles-el:$tiles3Version")
|
||||
optional("org.apache.tiles:tiles-extras:$tiles3Version") {
|
||||
exclude group: "org.springframework", module: "spring-web"
|
||||
}
|
||||
provided("junit:junit:4.12")
|
||||
testCompile("org.springframework:spring-aop:$springVersion")
|
||||
testCompile("org.springframework:spring-jdbc:$springVersion")
|
||||
testCompile("org.springframework:spring-test:$springVersion")
|
||||
testCompile("javax.validation:validation-api:2.0.1.Final")
|
||||
testCompile("org.hibernate:hibernate-entitymanager:$hibernate5Version")
|
||||
testCompile("org.hibernate:hibernate-validator:6.1.4.Final")
|
||||
testCompile("org.hsqldb:hsqldb:2.5.0")
|
||||
testCompile("javax.servlet.jsp:javax.servlet.jsp-api:2.3.2-b02")
|
||||
testCompile("javax.servlet:jstl:1.2")
|
||||
compile("org.springframework:spring-web")
|
||||
compile("org.springframework:spring-webmvc")
|
||||
compileOnly("javax.el:javax.el-api")
|
||||
provided("javax.servlet:javax.servlet-api")
|
||||
optional("org.hibernate:hibernate-core")
|
||||
optional("org.springframework.security:spring-security-core")
|
||||
optional("org.springframework:spring-orm")
|
||||
optional("org.springframework:spring-tx")
|
||||
optional("org.apache.tiles:tiles-api")
|
||||
optional("org.apache.tiles:tiles-core")
|
||||
optional("org.apache.tiles:tiles-servlet")
|
||||
optional("org.apache.tiles:tiles-jsp")
|
||||
optional("org.apache.tiles:tiles-el")
|
||||
optional("org.apache.tiles:tiles-extras")
|
||||
provided("junit:junit")
|
||||
testCompile("org.junit.jupiter:junit-jupiter")
|
||||
testCompile("org.easymock:easymock")
|
||||
testCompile("org.apache.tomcat:tomcat-jasper-el")
|
||||
testCompile("org.springframework:spring-aop")
|
||||
testCompile("org.springframework:spring-jdbc")
|
||||
testCompile("org.springframework:spring-test")
|
||||
testCompile("javax.validation:validation-api")
|
||||
testCompile("org.hibernate:hibernate-entitymanager")
|
||||
testCompile("org.hibernate:hibernate-validator")
|
||||
testCompile("org.hsqldb:hsqldb")
|
||||
testCompile("javax.servlet.jsp:javax.servlet.jsp-api")
|
||||
testCompile("javax.servlet:jstl")
|
||||
testRuntime("org.apache.logging.log4j:log4j-core")
|
||||
testRuntime("org.apache.logging.log4j:log4j-slf4j-impl")
|
||||
testRuntime("org.apache.logging.log4j:log4j-jul")
|
||||
}
|
||||
Reference in New Issue
Block a user