Sync docs from master to gh-pages
This commit is contained in:
@@ -572,6 +572,7 @@ $(addBlockSwitches);
|
||||
<li><a href="#_prerequisites">Prerequisites</a>
|
||||
<ul class="sectlevel5">
|
||||
<li><a href="#_add_gradle_plugin_with_dependencies">Add gradle plugin with dependencies</a></li>
|
||||
<li><a href="#_gradle_and_rest_assured_3_0">Gradle and Rest Assured 3.0</a></li>
|
||||
<li><a href="#_snapshot_versions_for_gradle">Snapshot versions for Gradle</a></li>
|
||||
<li><a href="#_add_stubs">Add stubs</a></li>
|
||||
</ul>
|
||||
@@ -593,6 +594,7 @@ $(addBlockSwitches);
|
||||
<ul class="sectlevel4">
|
||||
<li><a href="#_add_maven_plugin">Add maven plugin</a>
|
||||
<ul class="sectlevel5">
|
||||
<li><a href="#_maven_and_rest_assured_3_0">Maven and Rest Assured 3.0</a></li>
|
||||
<li><a href="#_snapshot_versions_for_maven">Snapshot versions for Maven</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
@@ -2089,7 +2091,7 @@ git pull https://your-git-server.com/server-side-fork.git contract-change-pr</co
|
||||
</div>
|
||||
<div class="listingblock">
|
||||
<div class="content">
|
||||
<pre class="highlight"><code class="language-xml" data-lang="xml"> <dependency>
|
||||
<pre class="highlight"><code class="language-xml" data-lang="xml"><dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-contract-verifier</artifactId>
|
||||
<scope>test</scope>
|
||||
@@ -2703,7 +2705,7 @@ one to one to the contents of the repo.</p>
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<java.version>1.8</java.version>
|
||||
<spring-cloud-contract.version>1.1.0.BUILD-SNAPSHOT</spring-cloud-contract.version>
|
||||
<spring-cloud-contract.version>1.1.1.BUILD-SNAPSHOT</spring-cloud-contract.version>
|
||||
<spring-cloud-dependencies.version>Dalston.BUILD-SNAPSHOT</spring-cloud-dependencies.version>
|
||||
<excludeBuildFolders>true</excludeBuildFolders>
|
||||
</properties>
|
||||
@@ -3018,6 +3020,39 @@ dependencies {
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect5">
|
||||
<h6 id="_gradle_and_rest_assured_3_0">Gradle and Rest Assured 3.0</h6>
|
||||
<div class="paragraph">
|
||||
<p>By default Rest Assured 2.x is added to the classpath. However in order to give the users the
|
||||
opportunity to use Rest Assured 3.x it’s enough to add it to the plugins classpath.</p>
|
||||
</div>
|
||||
<div class="listingblock">
|
||||
<div class="content">
|
||||
<pre class="highlight"><code class="language-groovy" data-lang="groovy">buildscript {
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath "org.springframework.boot:spring-boot-gradle-plugin:${springboot_version}"
|
||||
classpath "org.springframework.cloud:spring-cloud-contract-gradle-plugin:${verifier_version}"
|
||||
classpath "io.rest-assured:rest-assured:3.0.2"
|
||||
classpath "io.rest-assured:spring-mock-mvc:3.0.2"
|
||||
}
|
||||
}
|
||||
|
||||
depenendencies {
|
||||
// all dependencies
|
||||
// you can exclude rest-assured from spring-cloud-contract-verifier
|
||||
testCompile "io.rest-assured:rest-assured:3.0.2"
|
||||
testCompile "io.rest-assured:spring-mock-mvc:3.0.2"
|
||||
}</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>That way the plugin will automatically see that Rest Assured 3.x is present on the classpath
|
||||
and will modify the imports accordingly.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect5">
|
||||
<h6 id="_snapshot_versions_for_gradle">Snapshot versions for Gradle</h6>
|
||||
<div class="paragraph">
|
||||
<p>Add the additional snapshot repository to your build.gradle to use snapshot versions which are automatically uploaded after every successful build:</p>
|
||||
@@ -3386,6 +3421,66 @@ class LoanApplicationServiceSpec extends Specification {
|
||||
<p>You can read more in the <a href="https://cloud.spring.io/spring-cloud-contract/spring-cloud-contract-maven-plugin/">Spring Cloud Contract Maven Plugin Docs</a></p>
|
||||
</div>
|
||||
<div class="sect5">
|
||||
<h6 id="_maven_and_rest_assured_3_0">Maven and Rest Assured 3.0</h6>
|
||||
<div class="paragraph">
|
||||
<p>By default Rest Assured 2.x is added to the classpath. However in order to give the users the
|
||||
opportunity to use Rest Assured 3.x it’s enough to add it to the plugins classpath.</p>
|
||||
</div>
|
||||
<div class="listingblock">
|
||||
<div class="content">
|
||||
<pre class="highlight"><code class="language-groovy" data-lang="groovy"><plugin>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-contract-maven-plugin</artifactId>
|
||||
<version>${spring-cloud-contract.version}</version>
|
||||
<extensions>true</extensions>
|
||||
<configuration>
|
||||
<packageWithBaseClasses>com.example</packageWithBaseClasses>
|
||||
</configuration>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-contract-verifier</artifactId>
|
||||
<version>${spring-cloud-contract.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.rest-assured</groupId>
|
||||
<artifactId>rest-assured</artifactId>
|
||||
<version>3.0.2</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.rest-assured</groupId>
|
||||
<artifactId>spring-mock-mvc</artifactId>
|
||||
<version>3.0.2</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</plugin>
|
||||
|
||||
<dependencies>
|
||||
<!-- all dependencies -->
|
||||
<!-- you can exclude rest-assured from spring-cloud-contract-verifier -->
|
||||
<dependency>
|
||||
<groupId>io.rest-assured</groupId>
|
||||
<artifactId>rest-assured</artifactId>
|
||||
<version>3.0.2</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.rest-assured</groupId>
|
||||
<artifactId>spring-mock-mvc</artifactId>
|
||||
<version>3.0.2</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies></code></pre>
|
||||
</div>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>That way the plugin will automatically see that Rest Assured 3.x is present on the classpath
|
||||
and will modify the imports accordingly.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect5">
|
||||
<h6 id="_snapshot_versions_for_maven">Snapshot versions for Maven</h6>
|
||||
<div class="paragraph">
|
||||
<p>For Snapshot / Milestone versions you have to add the following section to your <code>pom.xml</code></p>
|
||||
|
||||
Reference in New Issue
Block a user