From 573ac36fb436de1e293ecb9f8c7fbdadeff5cf6d Mon Sep 17 00:00:00 2001
From: buildmaster
First, add the common jar dependency as a test dependency. Because your contracts files are available on the test resources path, the common jar classes automatically become visible in your Groovy files. The following examples show how to test the dependency:
Maven. -
<dependency> - <groupId>com.example</groupId> - <artifactId>beer-common</artifactId> - <version>${project.version}</version> - <scope>test</scope> -</dependency>
+
Unresolved directive in verifier_contract.adoc - include::https://raw.githubusercontent.com/spring-cloud-samples/spring-cloud-contract-samples/master/producer/pom.xml[tags=test_dep,indent=0]
Gradle. -
testCompile("com.example:beer-common:0.0.1-SNAPSHOT")+
Unresolved directive in verifier_contract.adoc - include::https://raw.githubusercontent.com/spring-cloud-samples/spring-cloud-contract-samples/master/producer/build.gradle[tags=test_dep,indent=0]
Now, you must add the dependency for the plugin to reuse at runtime, as shown in the following example:
Maven.
<plugin>
diff --git a/1.2.x/single/spring-cloud-contract.html b/1.2.x/single/spring-cloud-contract.html
index c4642131e8..42d0f25dce 100644
--- a/1.2.x/single/spring-cloud-contract.html
+++ b/1.2.x/single/spring-cloud-contract.html
@@ -4656,14 +4656,9 @@ maintain the static compatibility. Later in this document, you can see examples
to pass the dependency to your project.First, add the common jar dependency as a test dependency. Because your contracts files are available on the test resources path, the common jar classes automatically become visible in your Groovy files. The following examples show how to test the dependency:
Maven. -
<dependency> - <groupId>com.example</groupId> - <artifactId>beer-common</artifactId> - <version>${project.version}</version> - <scope>test</scope> -</dependency>
+
Unresolved directive in verifier_contract.adoc - include::https://raw.githubusercontent.com/spring-cloud-samples/spring-cloud-contract-samples/master/producer/pom.xml[tags=test_dep,indent=0]
Gradle. -
testCompile("com.example:beer-common:0.0.1-SNAPSHOT")+
Unresolved directive in verifier_contract.adoc - include::https://raw.githubusercontent.com/spring-cloud-samples/spring-cloud-contract-samples/master/producer/build.gradle[tags=test_dep,indent=0]
Now, you must add the dependency for the plugin to reuse at runtime, as shown in the following example:
Maven.
<plugin> diff --git a/1.2.x/spring-cloud-contract.xml b/1.2.x/spring-cloud-contract.xml index a1cde3a066..99a356bf82 100644 --- a/1.2.x/spring-cloud-contract.xml +++ b/1.2.x/spring-cloud-contract.xml @@ -4,7 +4,7 @@Spring Cloud Contract -2018-08-19 +2018-08-20 @@ -7514,18 +7514,13 @@ visible in your Groovy files. The following examples show how to test the depend Maven - <dependency> - <groupId>com.example</groupId> - <artifactId>beer-common</artifactId> - <version>${project.version}</version> - <scope>test</scope> -</dependency> +Unresolved directive in verifier_contract.adoc - include::https://raw.githubusercontent.com/spring-cloud-samples/spring-cloud-contract-samples/master/producer/pom.xml[tags=test_dep,indent=0] Gradle - testCompile("com.example:beer-common:0.0.1-SNAPSHOT") +Unresolved directive in verifier_contract.adoc - include::https://raw.githubusercontent.com/spring-cloud-samples/spring-cloud-contract-samples/master/producer/build.gradle[tags=test_dep,indent=0]