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
This commit is contained in:
Andy Wilkinson
2016-07-05 12:49:17 +01:00
parent 417547e61a
commit 0a0136ca58
2 changed files with 2 additions and 1 deletions

View File

@@ -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'

View File

@@ -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'