From 4192886284fe517ffc5b7ec75a8fab15ff0c3951 Mon Sep 17 00:00:00 2001 From: buildmaster Date: Sat, 9 Jun 2018 00:27:49 +0000 Subject: [PATCH] Sync docs from 1.1.x to gh-pages --- 1.1.x/multi/multi__customization.html | 7 ++++++- ...lti__spring_cloud_contract_verifier_introduction.html | 2 +- 1.1.x/single/spring-cloud-contract.html | 9 +++++++-- 1.1.x/spring-cloud-contract-maven-plugin/checkstyle.html | 6 +++--- 1.1.x/spring-cloud-contract-maven-plugin/complex.html | 6 +++--- 1.1.x/spring-cloud-contract-maven-plugin/configs.html | 6 +++--- .../spring-cloud-contract-maven-plugin/convert-mojo.html | 6 +++--- .../generateStubs-mojo.html | 6 +++--- .../generateTests-mojo.html | 6 +++--- 1.1.x/spring-cloud-contract-maven-plugin/help-mojo.html | 6 +++--- 1.1.x/spring-cloud-contract-maven-plugin/index.html | 6 +++--- .../spring-cloud-contract-maven-plugin/integration.html | 6 +++--- .../issue-tracking.html | 6 +++--- 1.1.x/spring-cloud-contract-maven-plugin/junit.html | 6 +++--- 1.1.x/spring-cloud-contract-maven-plugin/license.html | 6 +++--- .../spring-cloud-contract-maven-plugin/plugin-info.html | 6 +++--- .../plugin-management.html | 6 +++--- 1.1.x/spring-cloud-contract-maven-plugin/plugins.html | 6 +++--- .../spring-cloud-contract-maven-plugin/project-info.html | 6 +++--- .../project-reports.html | 6 +++--- .../project-summary.html | 6 +++--- 1.1.x/spring-cloud-contract-maven-plugin/run-mojo.html | 6 +++--- 1.1.x/spring-cloud-contract-maven-plugin/sitemap.html | 6 +++--- .../source-repository.html | 6 +++--- 1.1.x/spring-cloud-contract-maven-plugin/spock.html | 6 +++--- 1.1.x/spring-cloud-contract-maven-plugin/team-list.html | 6 +++--- 1.1.x/spring-cloud-contract-maven-plugin/usage.html | 6 +++--- 1.1.x/spring-cloud-contract.xml | 9 +++++++-- 28 files changed, 93 insertions(+), 78 deletions(-) diff --git a/1.1.x/multi/multi__customization.html b/1.1.x/multi/multi__customization.html index b089071bcc..36e9b9db44 100644 --- a/1.1.x/multi/multi__customization.html +++ b/1.1.x/multi/multi__customization.html @@ -138,7 +138,12 @@ maintain the static compatibility. Later in this document, you can see examples to pass the dependency to your project.

8.1.3 Test the Dependency in the Project’s Dependencies

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.  -

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]

+

<dependency>
+	<groupId>com.example</groupId>
+	<artifactId>beer-common</artifactId>
+	<version>${project.version}</version>
+	<scope>test</scope>
+</dependency>

Gradle. 

testCompile("com.example:beer-common:0.0.1-SNAPSHOT")

8.1.4 Test a Dependency in the Plugin’s Dependencies

Now, you must add the dependency for the plugin to reuse at runtime, as shown in the diff --git a/1.1.x/multi/multi__spring_cloud_contract_verifier_introduction.html b/1.1.x/multi/multi__spring_cloud_contract_verifier_introduction.html index 646ffbf533..be8e79970e 100644 --- a/1.1.x/multi/multi__spring_cloud_contract_verifier_introduction.html +++ b/1.1.x/multi/multi__spring_cloud_contract_verifier_introduction.html @@ -295,7 +295,7 @@ for more information. We highly recommend using the map notation!

2016-07-19 14:22:25.475 INFO 41050 --- [ main] o.s.c.c.stubrunner.AetherStubDownloader : Unpacked file to [/var/folders/0p/xwq47sq106x1_g3dtv6qfm940000gq/T/contracts100276532569594265] 2016-07-19 14:22:27.737 INFO 41050 --- [ main] o.s.c.c.stubrunner.StubRunnerExecutor : All stubs are now running RunningStubs [namesAndPorts={com.example:http-server:0.0.1-SNAPSHOT:stubs=8080}]

Which means that Stub Runner has found your stubs and started a server for app with group id com.example, artifact id http-server with version 0.0.1-SNAPSHOT of the stubs and with stubs classifier on port 8080.

file a PR

What we did until now is an iterative process. We can play around with the contract, install it locally and work on the consumer side until we’re happy with the contract.

Once we’re satisfied with the results and the test passes publish a PR to the server side. Currently the consumer side work is done.

2.4.3 Producer side (Fraud Detection server)

As a developer of the Fraud Detection server (a server to the Loan Issuance service):

initial implementation

As a reminder here you can see the initial implementation

@RequestMapping(value = "/fraudcheck", method = PUT)
 public FraudCheckResult fraudCheck(@RequestBody FraudCheck fraudCheck) {
-Unresolved directive in verifier_introduction.adoc - include::https://raw.githubusercontent.com/spring-cloud/spring-cloud-contract/master/samples/standalone/dsl/http-server/src/main/java/com/example/fraud/FraudDetectionController.java[tags=initial_impl,indent=0]
+return new FraudCheckResult(FraudCheckStatus.OK, NO_REASON);
 }

take over the PR

git checkout -b contract-change-pr master
 git pull https://your-git-server.com/server-side-fork.git contract-change-pr

You have to add the dependencies needed by the autogenerated tests

<dependency>
 	<groupId>org.springframework.cloud</groupId>
diff --git a/1.1.x/single/spring-cloud-contract.html b/1.1.x/single/spring-cloud-contract.html
index bcbbbf6c4b..841e2d4fc3 100644
--- a/1.1.x/single/spring-cloud-contract.html
+++ b/1.1.x/single/spring-cloud-contract.html
@@ -299,7 +299,7 @@ for more information. We highly recommend using the map notation!

2016-07-19 14:22:25.475 INFO 41050 --- [ main] o.s.c.c.stubrunner.AetherStubDownloader : Unpacked file to [/var/folders/0p/xwq47sq106x1_g3dtv6qfm940000gq/T/contracts100276532569594265] 2016-07-19 14:22:27.737 INFO 41050 --- [ main] o.s.c.c.stubrunner.StubRunnerExecutor : All stubs are now running RunningStubs [namesAndPorts={com.example:http-server:0.0.1-SNAPSHOT:stubs=8080}]

Which means that Stub Runner has found your stubs and started a server for app with group id com.example, artifact id http-server with version 0.0.1-SNAPSHOT of the stubs and with stubs classifier on port 8080.

file a PR

What we did until now is an iterative process. We can play around with the contract, install it locally and work on the consumer side until we’re happy with the contract.

Once we’re satisfied with the results and the test passes publish a PR to the server side. Currently the consumer side work is done.

2.4.3 Producer side (Fraud Detection server)

As a developer of the Fraud Detection server (a server to the Loan Issuance service):

initial implementation

As a reminder here you can see the initial implementation

@RequestMapping(value = "/fraudcheck", method = PUT)
 public FraudCheckResult fraudCheck(@RequestBody FraudCheck fraudCheck) {
-Unresolved directive in verifier_introduction.adoc - include::https://raw.githubusercontent.com/spring-cloud/spring-cloud-contract/master/samples/standalone/dsl/http-server/src/main/java/com/example/fraud/FraudDetectionController.java[tags=initial_impl,indent=0]
+return new FraudCheckResult(FraudCheckStatus.OK, NO_REASON);
 }

take over the PR

git checkout -b contract-change-pr master
 git pull https://your-git-server.com/server-side-fork.git contract-change-pr

You have to add the dependencies needed by the autogenerated tests

<dependency>
 	<groupId>org.springframework.cloud</groupId>
@@ -3321,7 +3321,12 @@ maintain the static compatibility. Later in this document, you can see examples
 to pass the dependency to your project.

8.1.3 Test the Dependency in the Project’s Dependencies

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.  -

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]

+

<dependency>
+	<groupId>com.example</groupId>
+	<artifactId>beer-common</artifactId>
+	<version>${project.version}</version>
+	<scope>test</scope>
+</dependency>

Gradle. 

testCompile("com.example:beer-common:0.0.1-SNAPSHOT")

8.1.4 Test a Dependency in the Plugin’s Dependencies

Now, you must add the dependency for the plugin to reuse at runtime, as shown in the diff --git a/1.1.x/spring-cloud-contract-maven-plugin/checkstyle.html b/1.1.x/spring-cloud-contract-maven-plugin/checkstyle.html index 1e0a0a9eee..e0b0199f29 100644 --- a/1.1.x/spring-cloud-contract-maven-plugin/checkstyle.html +++ b/1.1.x/spring-cloud-contract-maven-plugin/checkstyle.html @@ -1,13 +1,13 @@ - + Spring Cloud Contract Maven Plugin – Checkstyle Results @@ -146,7 +146,7 @@