From 0a0136ca5867813cc74984fbc7a77c7ab04cb0cb Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Tue, 5 Jul 2016 12:49:17 +0100 Subject: [PATCH] Move spring-webmvc dependency to where it's needed Previously, spring-restdocs-core had a dependency on spring-webmvc however it only used classes from spring-web. This commit moves the spring-webmvc dependency from spring-restdocs-core to spring-restdocs-mockmvc where it's needed. It's now in the runtime scope (rather than compile) as it's not needed at compile time but is needed at runtime by the MockMvc support in spring-test. Closes gh-273 --- spring-restdocs-core/build.gradle | 2 +- spring-restdocs-mockmvc/build.gradle | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/spring-restdocs-core/build.gradle b/spring-restdocs-core/build.gradle index 1bee13f5..4a841707 100644 --- a/spring-restdocs-core/build.gradle +++ b/spring-restdocs-core/build.gradle @@ -26,7 +26,7 @@ task jmustacheRepackJar(type: Jar) { repackJar -> dependencies { compile 'com.fasterxml.jackson.core:jackson-databind' - compile 'org.springframework:spring-webmvc' + compile 'org.springframework:spring-web' compile 'javax.servlet:javax.servlet-api' compile files(jmustacheRepackJar) jarjar 'com.googlecode.jarjar:jarjar:1.3' diff --git a/spring-restdocs-mockmvc/build.gradle b/spring-restdocs-mockmvc/build.gradle index b93fba78..d8a0529c 100644 --- a/spring-restdocs-mockmvc/build.gradle +++ b/spring-restdocs-mockmvc/build.gradle @@ -4,6 +4,7 @@ dependencies { compile 'org.springframework:spring-test' compile project(':spring-restdocs-core') optional 'junit:junit' + runtime 'org.springframework:spring-webmvc' testCompile 'org.mockito:mockito-core' testCompile 'org.hamcrest:hamcrest-library'