Updated docs
This commit is contained in:
26
_includes/build.gradle
Normal file
26
_includes/build.gradle
Normal file
@@ -0,0 +1,26 @@
|
||||
buildscript {
|
||||
dependencies {
|
||||
classpath "io.spring.gradle:dependency-management-plugin:0.6.0.RELEASE"
|
||||
// if using Stub Runner (consumer side) only remove this dependency
|
||||
classpath "{@= groupId @}:spring-cloud-contract-gradle-plugin:{@= version @}"
|
||||
}
|
||||
}
|
||||
|
||||
apply plugin: "io.spring.dependency-management"
|
||||
apply plugin: 'contract-verifier'
|
||||
|
||||
dependencyManagement {
|
||||
imports {
|
||||
mavenBom '{@= groupId @}:spring-cloud-contract-dependencies:{@= version @}'
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
testCompile '{@= groupId @}:spring-cloud-starter-contract-verifier'
|
||||
}
|
||||
|
||||
// In this section you define all Spring Cloud Contract Verifier Gradle Plugin properties
|
||||
contractVerifier {
|
||||
baseClassForTests = 'com.example.MvcTest'
|
||||
// fully qualified name to a class that will be the base class for your generated test classes
|
||||
}
|
||||
@@ -11,7 +11,12 @@ Download
|
||||
your project is with a dependency management system – the snippet below can
|
||||
be copied and pasted into your build. Need help? See our getting started guides
|
||||
on building with <a href="http://spring.io/guides/gs/maven/">Maven</a> and
|
||||
<a href="http://spring.io/guides/gs/gradle/">Gradle</a>.
|
||||
<a href="http://spring.io/guides/gs/gradle/">Gradle</a>. The example below is
|
||||
showing how to use the Spring Cloud Contract plugin. In order to use
|
||||
Spring Cloud Contract Stub Runner you just have to use different libraries
|
||||
as presented in the later part of this guide. Of course instead of adding the
|
||||
BOM of the concrete dependency you can add the release train BOM and you won't
|
||||
have to take care of versioning manually.
|
||||
</p>
|
||||
<div class="js-download-maven-widget"></div>
|
||||
</div>
|
||||
|
||||
32
_includes/pom.xml
Normal file
32
_includes/pom.xml
Normal file
@@ -0,0 +1,32 @@
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>{@= groupId @}</groupId>
|
||||
<artifactId>spring-cloud-contract-dependencies</artifactId>
|
||||
<version>{@= version @}</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>{@= groupId @}</groupId>
|
||||
<artifactId>spring-cloud-starter-contract-verifier</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugin>
|
||||
<groupId>{@= groupId @}</groupId>
|
||||
<artifactId>spring-cloud-contract-maven-plugin</artifactId>
|
||||
<version>{@= version @}</version>
|
||||
<!-- Don't forget about this value !! -->
|
||||
<extensions>true</extensions>
|
||||
<configuration>
|
||||
<!-- Provide the base class for your auto-generated tests -->
|
||||
<baseClassForTests>com.example.MvcTest</baseClassForTests>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</build>
|
||||
@@ -100,6 +100,17 @@
|
||||
</snapshots>
|
||||
</repository>
|
||||
</repositories>
|
||||
<!-- Unnecessary if you're using Spring Cloud Stub Runner only -->
|
||||
<pluginRepositories>
|
||||
<repository>
|
||||
<id>{@= repository.id @}</id>
|
||||
<name>{@= repository.name @}</name>
|
||||
<url>{@= repository.url @}</url>
|
||||
<snapshots>
|
||||
<enabled>{@= repository.snapshotsEnabled @}</enabled>
|
||||
</snapshots>
|
||||
</repository>
|
||||
</pluginRepositories>
|
||||
{% endhighlight %}
|
||||
</script>
|
||||
|
||||
@@ -123,6 +134,16 @@ dependencies {
|
||||
|
||||
<script type="text/html" id="project-repository-gradle-widget-template">
|
||||
{% highlight groovy %}
|
||||
|
||||
// Unnecessary if you're using Spring Cloud Stub Runner only
|
||||
buildscript {
|
||||
repositories {
|
||||
maven {
|
||||
url '{@= repository.url @}'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
repositories {
|
||||
maven {
|
||||
url '{@= repository.url @}'
|
||||
|
||||
Reference in New Issue
Block a user