From 8acb8aef1f4b87ecfb965084f3f19ce2e188201c Mon Sep 17 00:00:00 2001 From: Sam Brannen Date: Thu, 7 Sep 2017 12:16:53 +0200 Subject: [PATCH] Exclude commons-logging from spring-test dependencies Prior to this commit, various dependencies in the spring-test module pulled in commons-logging as a transitive dependency. Consequently, the presence of commons-logging in the generated Eclipse classpath overrode the intended use of the spring-jcl module causing JUL to be used instead of log4j for tests executed within Eclipse, thereby ignoring the configuration in src/test/resources/log4j2-test.xml. This commit addresses this issue by excluding commons-logging in spring-test.gradle for all Selenium dependencies. Issue: SPR-15930 --- spring-test/spring-test.gradle | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/spring-test/spring-test.gradle b/spring-test/spring-test.gradle index f62a4afa35..faf55f1348 100644 --- a/spring-test/spring-test.gradle +++ b/spring-test/spring-test.gradle @@ -45,8 +45,11 @@ dependencies { optional("net.sourceforge.htmlunit:htmlunit:2.27") { exclude group: "commons-logging", module: "commons-logging" } - optional("org.seleniumhq.selenium:htmlunit-driver:2.27") + optional("org.seleniumhq.selenium:htmlunit-driver:2.27") { + exclude group: "commons-logging", module: "commons-logging" + } optional("org.seleniumhq.selenium:selenium-java:3.4.0") { + exclude group: "commons-logging", module: "commons-logging" exclude group: "io.netty", module: "netty" } optional("org.xmlunit:xmlunit-matchers:2.3.0")