diff --git a/index.html b/index.html
index 8cdb890400..02196f3686 100644
--- a/index.html
+++ b/index.html
@@ -120,20 +120,27 @@ buildscript {
mavenCentral()
}
dependencies {
- classpath 'org.springframework.cloud.contract:spring-cloud-contract-verifier-gradle-plugin:${verifier_version}'
+ classpath 'org.springframework.cloud:spring-cloud-contract-verifier-gradle-plugin:${verifier_version}'
+ classpath "org.springframework.boot:spring-boot-gradle-plugin:${springBootPlugin
}
}
+apply plugin: 'spring-boot'
apply plugin: 'contract-verifier'
+dependencyManagement {
+ imports {
+ mavenBom "org.springframework.cloud:spring-cloud-contract-dependencies:${verifierVersion}"
+ }
+}
+
contractVerifier {
baseClassForTests = 'com.example.MvcTest'
// fully qualified name to a class that will be the base class for your generated test classes
}
dependencies {
- testCompile 'com.jayway.restassured:spring-mock-mvc:2.9.0'
- // needed if you're going to use Spring MockMvc for the generated tests
+ testCompile 'org.springframework.cloud:spring-cloud-starter-contract-verifier'
}
```
@@ -152,23 +159,21 @@ Maven Setup
and the required test dependencies
```xml
-
+
+
+
+ org.springframework.cloud
+ spring-cloud-contract-dependencies
+ ${spring-cloud-contract.version}
+ pom
+ import
+
+
+
+
- com.jayway.restassured
- spring-mock-mvc
- 2.9.0
- test
-
-
- com.toomuchcoding.jsonassert
- jsonassert
- 0.4.7
- test
-
-
- org.assertj
- assertj-core
- 3.4.1
+ org.springframework.cloud
+ spring-cloud-starter-contract-verifier
test
```
@@ -297,24 +302,62 @@ The idea behind CDC (Consumer Driven Contracts) is to share the contract between
### Client / Consumer side
-On the client (HTTP) / consumer (Messaging) side it's enough to provide a dependency to a proper Spring Cloud Contract Stub Runner implementation. In this case since our example consists of HTTP communication we will pick `spring-cloud-contract-stub-runner-spring`. Just add it to your project as a test dependency.
+On the client (HTTP) / consumer (Messaging) side it's enough to provide a dependency to a proper Spring Cloud Contract Stub Runner implementation. In this case since our example consists of HTTP communication with WireMock as the HTTP Server Stub. We will pick the following dependencies:
Maven
```xml
-
- org.springframework.cloud.contract
- spring-cloud-contract-stub-runner-spring
- ${spring-cloud-contract-verifier.version}
- test
-
+
+
+
+ org.springframework.cloud
+ spring-cloud-contract-dependencies
+ ${spring-cloud-contract.version}
+ pom
+ import
+
+
+
+
+
+
+ org.springframework.cloud
+ spring-cloud-contract-wiremock
+ test
+
+
+ org.springframework.cloud
+ spring-cloud-starter-contract-stub-runner
+ test
+
+
+
```
Gradle
```groovy
-testCompile "org.springframework.cloud.contract:spring-cloud-contract-stub-runner-spring:${verifier_version}"
-```
+buildscript {
+ repositories {
+ mavenCentral()
+ }
+ dependencies {
+ classpath "org.springframework.boot:spring-boot-gradle-plugin:${springBootPluginVersion}"
+ }
+}
+
+apply plugin: 'spring-boot'
+
+dependencyManagement {
+ imports {
+ mavenBom "org.springframework.cloud:spring-cloud-contract-dependencies:${verifierVersion}"
+ }
+}
+
+dependencies {
+ testCompile "org.springframework.cloud:spring-cloud-contract-wiremock"
+ testCompile "org.springframework.cloud:spring-cloud-starter-contract-stub-runner"
+}```
The last step is to provide the property for the Stub Runner to automatically download the required stubs. If you're using Spring Boot it's enough to add the following section to your project test properties: