From 6e7df513f1b29fc42f7cc4ce1254714eba2ea6e8 Mon Sep 17 00:00:00 2001 From: Rossen Stoyanchev Date: Fri, 7 Dec 2012 16:10:38 -0500 Subject: [PATCH] Exclude jcl-over-slf4j from tiles-core dependency tiles-core-3 brings in a dependency on jcl-overl-slf4 which causes an slf4j delegation loop as explained at [1] when tests run inside Eclipse. Other modules that depend on tiles-core like (tiles-servlet, tiles-jsp) have also had the exclusion added since they seem to bring it in as well. [1] http://www.slf4j.org/codes.html#jclDelegationLoop --- build.gradle | 34 +++++++++++++++++++++++++++------- 1 file changed, 27 insertions(+), 7 deletions(-) diff --git a/build.gradle b/build.gradle index 061184a0d9d..ac510aecf1e 100644 --- a/build.gradle +++ b/build.gradle @@ -473,9 +473,18 @@ project('spring-webmvc') { compile(project(":spring-context-support"), optional) // for Velocity support compile(project(":spring-oxm"), optional) // for MarshallingView compile("org.apache.tiles:tiles-api:2.1.2", optional) - compile("org.apache.tiles:tiles-core:2.1.2", optional) - compile("org.apache.tiles:tiles-jsp:2.1.2", optional) - compile("org.apache.tiles:tiles-servlet:2.1.2", optional) + compile("org.apache.tiles:tiles-core:2.1.2") { dep -> + optional dep + exclude group: 'org.slf4j', module: 'jcl-over-slf4j' + } + compile("org.apache.tiles:tiles-jsp:2.1.2") { dep -> + optional dep + exclude group: 'org.slf4j', module: 'jcl-over-slf4j' + } + compile("org.apache.tiles:tiles-servlet:2.1.2") { dep -> + optional dep + exclude group: 'org.slf4j', module: 'jcl-over-slf4j' + } compile("velocity-tools:velocity-tools-view:1.4", optional) compile("net.sourceforge.jexcelapi:jxl:2.6.3") { dep -> optional dep @@ -522,9 +531,18 @@ project('spring-webmvc-tiles3') { optional dep exclude group: 'org.slf4j', module: 'jcl-over-slf4j' } - compile("org.apache.tiles:tiles-servlet:3.0.1", optional) - compile("org.apache.tiles:tiles-jsp:3.0.1", optional) - compile("org.apache.tiles:tiles-el:3.0.1", optional) + compile("org.apache.tiles:tiles-servlet:3.0.1") { dep -> + optional dep + exclude group: 'org.slf4j', module: 'jcl-over-slf4j' + } + compile("org.apache.tiles:tiles-jsp:3.0.1") { dep -> + optional dep + exclude group: 'org.slf4j', module: 'jcl-over-slf4j' + } + compile("org.apache.tiles:tiles-el:3.0.1") { dep -> + optional dep + exclude group: 'org.slf4j', module: 'jcl-over-slf4j' + } compile("org.apache.tomcat:tomcat-servlet-api:7.0.32", provided) // servlet-api 3.0 compile project(":spring-web").sourceSets*.output // mock request & response } @@ -603,7 +621,9 @@ project('spring-test-mvc') { testCompile("org.apache.tiles:tiles-core:3.0.1") { exclude group: 'org.slf4j', module: 'jcl-over-slf4j' } - testCompile "org.apache.tiles:tiles-servlet:3.0.1" + testCompile("org.apache.tiles:tiles-servlet:3.0.1") { + exclude group: 'org.slf4j', module: 'jcl-over-slf4j' + } } }