Sync docs from master to gh-pages

This commit is contained in:
buildmaster
2016-09-07 08:18:51 +00:00
parent f69689d62b
commit 6aa1345a03

View File

@@ -511,6 +511,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
</ul>
</li>
<li><a href="#_scenarios">Scenarios</a></li>
<li><a href="#_stubs_and_transitive_dependencies">Stubs and transitive dependencies</a></li>
</ul>
</li>
<li><a href="#_spring_cloud_contract_verifier_messaging">Spring Cloud Contract Verifier Messaging</a>
@@ -2696,6 +2697,50 @@ a WireMock server configured using stubs generated by Spring Cloud Contract Veri
<p>Spring Cloud Contract Verifier will also generate tests with guaranteed order of execution.</p>
</div>
</div>
<div class="sect3">
<h4 id="_stubs_and_transitive_dependencies">Stubs and transitive dependencies</h4>
<div class="paragraph">
<p>The Maven and Gradle plugin that we&#8217;re created are adding the tasks that create the stubs jar for you. What can be problematic
is that when reusing the stubs you can by mistake import all of that stub dependencies! When building a Maven artifact
even though you have a couple of different jars, all of them share one pom:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlight"><code class="language-bash" data-lang="bash">├── github-webhook-0.0.1.BUILD-20160903.075506-1-stubs.jar
├── github-webhook-0.0.1.BUILD-20160903.075506-1-stubs.jar.sha1
├── github-webhook-0.0.1.BUILD-20160903.075655-2-stubs.jar
├── github-webhook-0.0.1.BUILD-20160903.075655-2-stubs.jar.sha1
├── github-webhook-0.0.1.BUILD-SNAPSHOT.jar
├── github-webhook-0.0.1.BUILD-SNAPSHOT.pom
├── github-webhook-0.0.1.BUILD-SNAPSHOT-stubs.jar
├── ...
└── ...</code></pre>
</div>
</div>
<div class="paragraph">
<p>There are three possibilities of working with those dependencies so as not to have any issues with transitive dependencies.</p>
</div>
<div class="paragraph">
<p><strong>Mark all application dependencies as optional</strong></p>
</div>
<div class="paragraph">
<p>If in the <code>github-webhook</code> application we would mark all of our dependencies as optional, when you include the
<code>github-webhook</code> stubs in another application (or when that dependency gets downloaded by Stub Runner) then, since
all of the depenencies are optional, they will not get downloaded.</p>
</div>
<div class="paragraph">
<p><strong>Create a separate artifactid for stubs</strong></p>
</div>
<div class="paragraph">
<p>If you create a separate artifactid then you can set it up in whatever way you wish. For example by having no dependencies at all.</p>
</div>
<div class="paragraph">
<p><strong>Exclude dependencies on the consumer side</strong></p>
</div>
<div class="paragraph">
<p>As a consumer, if you add the stub dependency to your classpath you can explicitly exclude the unwanted dependencies.</p>
</div>
</div>
</div>
<div class="sect2">
<h3 id="_spring_cloud_contract_verifier_messaging">Spring Cloud Contract Verifier Messaging</h3>
@@ -5787,7 +5832,7 @@ number of different ways, including as described above using
</div>
<div id="footer">
<div id="footer-text">
Last updated 2016-09-07 03:21:46 UTC
Last updated 2016-09-07 06:21:29 UTC
</div>
</div>
</body>