Skip to content

Commit 0a0136c

Browse files
committed
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
1 parent 417547e commit 0a0136c

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

spring-restdocs-core/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ task jmustacheRepackJar(type: Jar) { repackJar ->
2626

2727
dependencies {
2828
compile 'com.fasterxml.jackson.core:jackson-databind'
29-
compile 'org.springframework:spring-webmvc'
29+
compile 'org.springframework:spring-web'
3030
compile 'javax.servlet:javax.servlet-api'
3131
compile files(jmustacheRepackJar)
3232
jarjar 'com.googlecode.jarjar:jarjar:1.3'

spring-restdocs-mockmvc/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ dependencies {
44
compile 'org.springframework:spring-test'
55
compile project(':spring-restdocs-core')
66
optional 'junit:junit'
7+
runtime 'org.springframework:spring-webmvc'
78

89
testCompile 'org.mockito:mockito-core'
910
testCompile 'org.hamcrest:hamcrest-library'

0 commit comments

Comments
 (0)