Skip to content

Commit 2fd4462

Browse files
committed
Upgrade build to Gradle 2.14
In the process of upgrading the build to use Gradle 2.14, the setFieldOnLegacyEntityWithSideEffectsInToString() test method in ReflectionTestUtilsTests began to fail. The reason is that the log level for ReflectionTestUtils is now DEBUG by default with Gradle 2.14. The apparent cause is that log4j was present on the test runtime classpath for the spring-test module with all previous versions of Gradle (via a transitive optional dependency from another project that spring-test depends on). Thus the configuration in log4j.properties in spring-test was previously honored, but with Gradle 2.14 a different commons logging implementation is picked up. Thus, in addition to upgrading the build to Gradle 2.14, this commit introduces an explicit test runtime dependency on log4j in the spring-test module. The discovered bug in ReflectionTestUtils regarding DEBUG log level will be addressed separately. Issue: SPR-14362
1 parent 0815560 commit 2fd4462

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed

build.gradle

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ configure(allprojects) { project ->
6060
ext.jrubyVersion = "1.7.25" // JRuby 9000 only supported through JSR-223 (StandardScriptFactory)
6161
ext.jtaVersion = "1.2"
6262
ext.junitVersion = "4.12"
63+
ext.log4jVersion = "1.2.17"
6364
ext.nettyVersion = "4.1.1.Final"
6465
ext.okhttpVersion = "2.7.5"
6566
ext.okhttp3Version = "3.3.1"
@@ -351,7 +352,7 @@ project("spring-core") {
351352
optional("commons-codec:commons-codec:1.10")
352353
optional("org.aspectj:aspectjweaver:${aspectjVersion}")
353354
optional("net.sf.jopt-simple:jopt-simple:5.0.1")
354-
optional("log4j:log4j:1.2.17")
355+
optional("log4j:log4j:${log4jVersion}")
355356
testCompile("org.apache.tomcat.embed:tomcat-embed-core:${tomcatVersion}")
356357
testCompile("xmlunit:xmlunit:${xmlunitVersion}")
357358
testCompile("com.fasterxml.woodstox:woodstox-core:5.0.2") {
@@ -382,7 +383,7 @@ project("spring-beans") {
382383
optional("javax.inject:javax.inject:1")
383384
optional("javax.el:javax.el-api:2.2.5")
384385
optional("org.yaml:snakeyaml:${snakeyamlVersion}")
385-
testCompile("log4j:log4j:1.2.17")
386+
testCompile("log4j:log4j:${log4jVersion}")
386387
testCompile("org.apache.tomcat.embed:tomcat-embed-core:${tomcatVersion}")
387388
}
388389
}
@@ -528,7 +529,7 @@ project("spring-messaging") {
528529
testCompile("org.apache.tomcat.embed:tomcat-embed-logging-juli:${tomcatVersion}")
529530
testCompile("io.netty:netty-all:${nettyVersion}")
530531
testCompile("commons-dbcp:commons-dbcp:1.4")
531-
testCompile("log4j:log4j:1.2.17")
532+
testCompile("log4j:log4j:${log4jVersion}")
532533
testCompile("org.slf4j:slf4j-jcl:${slf4jVersion}")
533534
testCompile("xmlunit:xmlunit:${xmlunitVersion}")
534535
}
@@ -714,7 +715,7 @@ project("spring-web") {
714715
optional("org.eclipse.jetty:jetty-server:${jettyVersion}") {
715716
exclude group: "javax.servlet", module: "javax.servlet-api"
716717
}
717-
optional("log4j:log4j:1.2.17")
718+
optional("log4j:log4j:${log4jVersion}")
718719
optional("com.google.protobuf:protobuf-java:2.6.1")
719720
optional("com.googlecode.protobuf-java-format:protobuf-java-format:1.4")
720721
optional("javax.mail:javax.mail-api:${javamailVersion}")
@@ -974,7 +975,7 @@ project("spring-websocket") {
974975
testCompile("org.apache.tomcat.embed:tomcat-embed-logging-juli:${tomcatVersion}")
975976
testCompile("io.projectreactor:reactor-net:${reactorVersion}")
976977
testCompile("io.netty:netty-all:${nettyVersion}")
977-
testCompile("log4j:log4j:1.2.17")
978+
testCompile("log4j:log4j:${log4jVersion}")
978979
testCompile("org.slf4j:slf4j-jcl:${slf4jVersion}")
979980
}
980981
}
@@ -1033,6 +1034,7 @@ project("spring-test") {
10331034
testCompile("org.slf4j:slf4j-jcl:${slf4jVersion}")
10341035
testCompile("org.apache.httpcomponents:httpclient:${httpclientVersion}")
10351036
testCompile("javax.cache:cache-api:1.0.0")
1037+
testRuntime("log4j:log4j:${log4jVersion}")
10361038
testRuntime("org.ehcache:ehcache:${ehcache3Version}")
10371039
testRuntime("org.terracotta:management-model:2.0.0")
10381040
}
@@ -1365,7 +1367,7 @@ configure(rootProject) {
13651367

13661368
task wrapper(type: Wrapper) {
13671369
description = "Generates gradlew[.bat] scripts"
1368-
gradleVersion = "2.13"
1370+
gradleVersion = "2.14"
13691371

13701372
doLast() {
13711373
def gradleOpts = "-XX:MaxMetaspaceSize=1024m -Xmx1024m"

gradle/wrapper/gradle-wrapper.jar

-237 Bytes
Binary file not shown.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#Mon Apr 25 12:42:24 CEST 2016
1+
#Tue Jun 14 17:29:02 CEST 2016
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-2.13-bin.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14-bin.zip

0 commit comments

Comments
 (0)