Files
spring-cloud-contract/spring-cloud-contract-maven-plugin/convert-mojo.html
2018-12-07 03:46:57 +00:00

776 lines
25 KiB
HTML

<!DOCTYPE html>
<!--
| Generated by Apache Maven Doxia Site Renderer 1.8.1 at 2018-12-07
| Rendered using Apache Maven Fluido Skin 1.5
-->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="Date-Revision-yyyymmdd" content="20181207" />
<meta http-equiv="Content-Language" content="en" />
<title>Spring Cloud Contract Maven Plugin &#x2013; spring-cloud-contract:convert</title>
<link rel="stylesheet" href="./css/apache-maven-fluido-1.5.min.css" />
<link rel="stylesheet" href="./css/site.css" />
<link rel="stylesheet" href="./css/print.css" media="print" />
<script type="text/javascript" src="./js/apache-maven-fluido-1.5.min.js"></script>
</head>
<body class="topBarEnabled">
<a href="https://github.com/spring-cloud/spring-cloud-contract">
<img style="position: absolute; top: 0; right: 0; border: 0; z-index: 10000;"
src="https://s3.amazonaws.com/github/ribbons/forkme_right_orange_ff7600.png"
alt="Fork me on GitHub">
</a>
<div id="topbar" class="navbar navbar-fixed-top ">
<div class="navbar-inner">
<div class="container-fluid">
<a data-target=".nav-collapse" data-toggle="collapse" class="btn btn-navbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</a>
<ul class="nav">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Overview <b class="caret"></b></a>
<ul class="dropdown-menu">
<li> <a href="index.html" title="Introduction">Introduction</a>
</li>
<li> <a href="usage.html" title="Usage">Usage</a>
</li>
<li> <a href="plugin-info.html" title="Goals">Goals</a>
</li>
<li> <a href="junit.html" title="JUnit Configuration">JUnit Configuration</a>
</li>
<li> <a href="spock.html" title="Spock Configuration">Spock Configuration</a>
</li>
<li> <a href="complex.html" title="Complex Configuration">Complex Configuration</a>
</li>
<li> <a href="configs.html" title="Configuration snippets">Configuration snippets</a>
</li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Related Projects <b class="caret"></b></a>
<ul class="dropdown-menu">
<li> <a href="https://github.com/spring-cloud/spring-cloud-contract" title="Spring Cloud Contract">Spring Cloud Contract</a>
</li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Project Documentation <b class="caret"></b></a>
<ul class="dropdown-menu">
<li class="dropdown-submenu">
<a href="project-info.html" title="Project Information">Project Information</a>
<ul class="dropdown-menu">
<li> <a href="ci-management.html" title="CI Management">CI Management</a>
</li>
<li> <a href="index.html" title="About">About</a>
</li>
<li> <a href="issue-management.html" title="Issue Management">Issue Management</a>
</li>
<li> <a href="licenses.html" title="Licenses">Licenses</a>
</li>
<li> <a href="plugin-management.html" title="Plugin Management">Plugin Management</a>
</li>
<li> <a href="plugins.html" title="Plugins">Plugins</a>
</li>
<li> <a href="team.html" title="Team">Team</a>
</li>
<li> <a href="scm.html" title="Source Code Management">Source Code Management</a>
</li>
<li> <a href="summary.html" title="Summary">Summary</a>
</li>
</ul>
</li>
<li class="dropdown-submenu">
<a href="project-reports.html" title="Project Reports">Project Reports</a>
<ul class="dropdown-menu">
<li> <a href="checkstyle.html" title="Checkstyle">Checkstyle</a>
</li>
<li> <a href="plugin-info.html" title="Plugin Documentation">Plugin Documentation</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
</div>
</div>
<div class="container-fluid">
<div id="banner">
<div class="pull-left">
<div id="bannerLeft">
<h2>Spring Cloud Contract Maven Plugin</h2>
</div>
</div>
<div class="pull-right"> <div id="bannerRight">
<img src="" />
</div>
</div>
<div class="clear"><hr/></div>
</div>
<div id="breadcrumbs">
<ul class="breadcrumb">
<li id="publishDate">Last Published: 2018-12-07
<span class="divider">|</span>
</li>
<li id="projectVersion">Version: 2.1.0.BUILD-SNAPSHOT
</li>
</ul>
</div>
<div class="row-fluid">
<div id="leftColumn" class="span2">
<div class="well sidebar-nav">
<ul class="nav nav-list">
<li class="nav-header">Overview</li>
<li>
<a href="index.html" title="Introduction">
<span class="none"></span>
Introduction</a>
</li>
<li>
<a href="usage.html" title="Usage">
<span class="none"></span>
Usage</a>
</li>
<li>
<a href="plugin-info.html" title="Goals">
<span class="none"></span>
Goals</a>
</li>
<li>
<a href="junit.html" title="JUnit Configuration">
<span class="none"></span>
JUnit Configuration</a>
</li>
<li>
<a href="spock.html" title="Spock Configuration">
<span class="none"></span>
Spock Configuration</a>
</li>
<li>
<a href="complex.html" title="Complex Configuration">
<span class="none"></span>
Complex Configuration</a>
</li>
<li>
<a href="configs.html" title="Configuration snippets">
<span class="none"></span>
Configuration snippets</a>
</li>
<li class="nav-header">Related Projects</li>
<li>
<a href="https://github.com/spring-cloud/spring-cloud-contract" class="externalLink" title="Spring Cloud Contract">
<span class="none"></span>
Spring Cloud Contract</a>
</li>
<li class="nav-header">Project Documentation</li>
<li>
<a href="project-info.html" title="Project Information">
<span class="icon-chevron-right"></span>
Project Information</a>
</li>
<li>
<a href="project-reports.html" title="Project Reports">
<span class="icon-chevron-right"></span>
Project Reports</a>
</li>
</ul>
<hr />
<div id="poweredBy">
<div class="clear"></div>
<div class="clear"></div>
<div class="clear"></div>
<div class="clear"></div>
<a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy">
<img class="builtBy" alt="Built by Maven" src="./images/logos/maven-feather.png" />
</a>
</div>
</div>
</div>
<div id="bodyColumn" class="span10" >
<div class="section">
<h2><a name="spring-cloud-contract:convert"></a>spring-cloud-contract:convert</h2>
<p><b>Full name</b>:</p>
<p>org.springframework.cloud:spring-cloud-contract-maven-plugin:2.1.0.BUILD-SNAPSHOT:convert</p>
<p><b>Description</b>:</p>
<div>Convert Spring Cloud Contract Verifier contracts into WireMock
stubs mappings.
<p>This goal allows you to generate `stubs-jar` or execute
`spring-cloud-contract:run` with generated WireMock mappings.</p></div>
<p><b>Attributes</b>:</p>
<ul>
<li>Binds by default to the <a class="externalLink" href="http://maven.apache.org/ref/current/maven-core/lifecycles.html">lifecycle phase</a>: <tt>process-test-resources</tt>.</li>
</ul>
<div class="section">
<h3><a name="Optional_Parameters"></a>Optional Parameters</h3>
<table class="table table-striped" border="0">
<tr class="a">
<th>Name</th>
<th>Type</th>
<th>Since</th>
<th>Description</th>
</tr>
<tr class="b">
<td><b><a href="#contractDependency">contractDependency</a></b></td>
<td><tt>Dependency</tt></td>
<td><tt>-</tt></td>
<td>(no description)<br /><b>User property is</b>: <tt>contractDependency</tt>.<br /></td>
</tr>
<tr class="a">
<td><b><a href="#contractsDirectory">contractsDirectory</a></b></td>
<td><tt>File</tt></td>
<td><tt>-</tt></td>
<td>Directory containing Spring Cloud Contract Verifier contracts
written using the GroovyDSL<br /><b>Default value is</b>: <tt>${project.basedir}/src/test/resources/contracts</tt>.<br /><b>User property is</b>: <tt>spring.cloud.contract.verifier.contractsDirectory</tt>.<br /></td>
</tr>
<tr class="b">
<td><b><a href="#contractsMode">contractsMode</a></b></td>
<td><tt>StubRunnerProperties$StubsMode</tt></td>
<td><tt>-</tt></td>
<td>Picks the mode in which stubs will be found and registered<br /><b>Default value is</b>: <tt>CLASSPATH</tt>.<br /><b>User property is</b>: <tt>contractsMode</tt>.<br /></td>
</tr>
<tr class="a">
<td><b><a href="#contractsPath">contractsPath</a></b></td>
<td><tt>String</tt></td>
<td><tt>-</tt></td>
<td>The path in the JAR with all the contracts where contracts for this
particular service lay. If not provided will be resolved to
<tt>groupid/artifactid</tt>. Example: <br />
<br />
If <tt>groupid</tt> is <tt>com.example</tt> and
<tt>artifactid</tt> is <tt>service</tt> then the resolved
path will be <tt>/com/example/artifactid</tt><br /><b>User property is</b>: <tt>contractsPath</tt>.<br /></td>
</tr>
<tr class="b">
<td><b><a href="#contractsProperties">contractsProperties</a></b></td>
<td><tt>Map</tt></td>
<td><tt>-</tt></td>
<td>Map of properties that can be passed to custom
<tt>StubDownloaderBuilder</tt><br /><b>User property is</b>: <tt>contractsProperties</tt>.<br /></td>
</tr>
<tr class="a">
<td><b><a href="#contractsRepositoryPassword">contractsRepositoryPassword</a></b></td>
<td><tt>String</tt></td>
<td><tt>-</tt></td>
<td>The password to be used to connect to the repo with contracts.<br /><b>User property is</b>: <tt>contractsRepositoryPassword</tt>.<br /></td>
</tr>
<tr class="b">
<td><b><a href="#contractsRepositoryProxyHost">contractsRepositoryProxyHost</a></b></td>
<td><tt>String</tt></td>
<td><tt>-</tt></td>
<td>The proxy host to be used to connect to the repo with contracts.<br /><b>User property is</b>: <tt>contractsRepositoryProxyHost</tt>.<br /></td>
</tr>
<tr class="a">
<td><b><a href="#contractsRepositoryProxyPort">contractsRepositoryProxyPort</a></b></td>
<td><tt>Integer</tt></td>
<td><tt>-</tt></td>
<td>The proxy port to be used to connect to the repo with contracts.<br /><b>User property is</b>: <tt>contractsRepositoryProxyPort</tt>.<br /></td>
</tr>
<tr class="b">
<td><b><a href="#contractsRepositoryUrl">contractsRepositoryUrl</a></b></td>
<td><tt>String</tt></td>
<td><tt>-</tt></td>
<td>The URL from which a JAR containing the contracts should get
downloaded. If not provided but artifactid / coordinates notation
was provided then the current Maven's build repositories will be
taken into consideration<br /><b>User property is</b>: <tt>contractsRepositoryUrl</tt>.<br /></td>
</tr>
<tr class="a">
<td><b><a href="#contractsRepositoryUsername">contractsRepositoryUsername</a></b></td>
<td><tt>String</tt></td>
<td><tt>-</tt></td>
<td>The user name to be used to connect to the repo with contracts.<br /><b>User property is</b>: <tt>contractsRepositoryUsername</tt>.<br /></td>
</tr>
<tr class="b">
<td><b><a href="#contractsSnapshotCheckSkip">contractsSnapshotCheckSkip</a></b></td>
<td><tt>boolean</tt></td>
<td><tt>-</tt></td>
<td><b>Deprecated.</b> - with 2.1.0 this option is redundant<br /><b>Default value is</b>: <tt>false</tt>.<br /><b>User property is</b>: <tt>contractsSnapshotCheckSkip</tt>.<br /></td>
</tr>
<tr class="a">
<td><b><a href="#deleteStubsAfterTest">deleteStubsAfterTest</a></b></td>
<td><tt>boolean</tt></td>
<td><tt>-</tt></td>
<td>If set to <tt>false</tt> will NOT delete stubs from a temporary
folder after running tests<br /><b>Default value is</b>: <tt>true</tt>.<br /><b>User property is</b>: <tt>deleteStubsAfterTest</tt>.<br /></td>
</tr>
<tr class="b">
<td><b><a href="#destination">destination</a></b></td>
<td><tt>File</tt></td>
<td><tt>-</tt></td>
<td>(no description)<br /><b>Default value is</b>: <tt>${basedir}</tt>.<br /><b>User property is</b>: <tt>stubsDirectory</tt>.<br /></td>
</tr>
<tr class="a">
<td><b><a href="#excludeBuildFolders">excludeBuildFolders</a></b></td>
<td><tt>boolean</tt></td>
<td><tt>-</tt></td>
<td>If <tt>true</tt> then any file laying in a path that contains
<tt>build</tt> or <tt>target</tt> will get excluded in
further processing.<br /><b>Default value is</b>: <tt>false</tt>.<br /><b>User property is</b>: <tt>excludeBuildFolders</tt>.<br /></td>
</tr>
<tr class="b">
<td><b><a href="#skip">skip</a></b></td>
<td><tt>boolean</tt></td>
<td><tt>-</tt></td>
<td>(no description)<br /><b>Default value is</b>: <tt>false</tt>.<br /><b>User property is</b>: <tt>spring.cloud.contract.verifier.skip</tt>.<br /></td>
</tr>
<tr class="a">
<td><b><a href="#source">source</a></b></td>
<td><tt>File</tt></td>
<td><tt>-</tt></td>
<td>Directory containing contracts written using the GroovyDSL
<p>This parameter is only used when goal is executed outside of
maven project.</p><br /><b>Default value is</b>: <tt>${basedir}</tt>.<br /><b>User property is</b>: <tt>contractsDirectory</tt>.<br /></td>
</tr>
<tr class="b">
<td><b><a href="#stubsDirectory">stubsDirectory</a></b></td>
<td><tt>File</tt></td>
<td><tt>-</tt></td>
<td>Directory where the generated WireMock stubs from Groovy DSL should
be placed. You can then mention them in your packaging task to
create jar with stubs<br /><b>Default value is</b>: <tt>${project.build.directory}/stubs/</tt>.<br /></td>
</tr>
</table>
</div>
<div class="section">
<h3><a name="Parameter_Details"></a>Parameter Details</h3>
<p><b><a name="contractDependency">contractDependency</a>:</b></p>
<div>(no description)</div>
<ul>
<li><b>Type</b>: <tt>org.apache.maven.model.Dependency</tt></li>
<li><b>Required</b>: <tt>No</tt></li>
<li><b>User Property</b>: <tt>contractDependency</tt></li>
</ul><hr />
<p><b><a name="contractsDirectory">contractsDirectory</a>:</b></p>
<div>Directory containing Spring Cloud Contract Verifier contracts
written using the GroovyDSL</div>
<ul>
<li><b>Type</b>: <tt>java.io.File</tt></li>
<li><b>Required</b>: <tt>No</tt></li>
<li><b>User Property</b>: <tt>spring.cloud.contract.verifier.contractsDirectory</tt></li>
<li><b>Default</b>: <tt>${project.basedir}/src/test/resources/contracts</tt></li>
</ul><hr />
<p><b><a name="contractsMode">contractsMode</a>:</b></p>
<div>Picks the mode in which stubs will be found and registered</div>
<ul>
<li><b>Type</b>: <tt>org.springframework.cloud.contract.stubrunner.spring.StubRunnerProperties$StubsMode</tt></li>
<li><b>Required</b>: <tt>No</tt></li>
<li><b>User Property</b>: <tt>contractsMode</tt></li>
<li><b>Default</b>: <tt>CLASSPATH</tt></li>
</ul><hr />
<p><b><a name="contractsPath">contractsPath</a>:</b></p>
<div>The path in the JAR with all the contracts where contracts for this
particular service lay. If not provided will be resolved to
<tt>groupid/artifactid</tt>. Example: <br />
<br />
If <tt>groupid</tt> is <tt>com.example</tt> and
<tt>artifactid</tt> is <tt>service</tt> then the resolved
path will be <tt>/com/example/artifactid</tt></div>
<ul>
<li><b>Type</b>: <tt>java.lang.String</tt></li>
<li><b>Required</b>: <tt>No</tt></li>
<li><b>User Property</b>: <tt>contractsPath</tt></li>
</ul><hr />
<p><b><a name="contractsProperties">contractsProperties</a>:</b></p>
<div>Map of properties that can be passed to custom
<tt>StubDownloaderBuilder</tt></div>
<ul>
<li><b>Type</b>: <tt>java.util.Map</tt></li>
<li><b>Required</b>: <tt>No</tt></li>
<li><b>User Property</b>: <tt>contractsProperties</tt></li>
</ul><hr />
<p><b><a name="contractsRepositoryPassword">contractsRepositoryPassword</a>:</b></p>
<div>The password to be used to connect to the repo with contracts.</div>
<ul>
<li><b>Type</b>: <tt>java.lang.String</tt></li>
<li><b>Required</b>: <tt>No</tt></li>
<li><b>User Property</b>: <tt>contractsRepositoryPassword</tt></li>
</ul><hr />
<p><b><a name="contractsRepositoryProxyHost">contractsRepositoryProxyHost</a>:</b></p>
<div>The proxy host to be used to connect to the repo with contracts.</div>
<ul>
<li><b>Type</b>: <tt>java.lang.String</tt></li>
<li><b>Required</b>: <tt>No</tt></li>
<li><b>User Property</b>: <tt>contractsRepositoryProxyHost</tt></li>
</ul><hr />
<p><b><a name="contractsRepositoryProxyPort">contractsRepositoryProxyPort</a>:</b></p>
<div>The proxy port to be used to connect to the repo with contracts.</div>
<ul>
<li><b>Type</b>: <tt>java.lang.Integer</tt></li>
<li><b>Required</b>: <tt>No</tt></li>
<li><b>User Property</b>: <tt>contractsRepositoryProxyPort</tt></li>
</ul><hr />
<p><b><a name="contractsRepositoryUrl">contractsRepositoryUrl</a>:</b></p>
<div>The URL from which a JAR containing the contracts should get
downloaded. If not provided but artifactid / coordinates notation
was provided then the current Maven's build repositories will be
taken into consideration</div>
<ul>
<li><b>Type</b>: <tt>java.lang.String</tt></li>
<li><b>Required</b>: <tt>No</tt></li>
<li><b>User Property</b>: <tt>contractsRepositoryUrl</tt></li>
</ul><hr />
<p><b><a name="contractsRepositoryUsername">contractsRepositoryUsername</a>:</b></p>
<div>The user name to be used to connect to the repo with contracts.</div>
<ul>
<li><b>Type</b>: <tt>java.lang.String</tt></li>
<li><b>Required</b>: <tt>No</tt></li>
<li><b>User Property</b>: <tt>contractsRepositoryUsername</tt></li>
</ul><hr />
<p><b><a name="contractsSnapshotCheckSkip">contractsSnapshotCheckSkip</a>:</b></p>
<div><b>Deprecated.</b> - with 2.1.0 this option is redundant</div>
<div>If <tt>true</tt> then will not assert whether a stub / contract
JAR was downloaded from local or remote location</div>
<ul>
<li><b>Type</b>: <tt>boolean</tt></li>
<li><b>Required</b>: <tt>No</tt></li>
<li><b>User Property</b>: <tt>contractsSnapshotCheckSkip</tt></li>
<li><b>Default</b>: <tt>false</tt></li>
</ul><hr />
<p><b><a name="deleteStubsAfterTest">deleteStubsAfterTest</a>:</b></p>
<div>If set to <tt>false</tt> will NOT delete stubs from a temporary
folder after running tests</div>
<ul>
<li><b>Type</b>: <tt>boolean</tt></li>
<li><b>Required</b>: <tt>No</tt></li>
<li><b>User Property</b>: <tt>deleteStubsAfterTest</tt></li>
<li><b>Default</b>: <tt>true</tt></li>
</ul><hr />
<p><b><a name="destination">destination</a>:</b></p>
<div>(no description)</div>
<ul>
<li><b>Type</b>: <tt>java.io.File</tt></li>
<li><b>Required</b>: <tt>No</tt></li>
<li><b>User Property</b>: <tt>stubsDirectory</tt></li>
<li><b>Default</b>: <tt>${basedir}</tt></li>
</ul><hr />
<p><b><a name="excludeBuildFolders">excludeBuildFolders</a>:</b></p>
<div>If <tt>true</tt> then any file laying in a path that contains
<tt>build</tt> or <tt>target</tt> will get excluded in
further processing.</div>
<ul>
<li><b>Type</b>: <tt>boolean</tt></li>
<li><b>Required</b>: <tt>No</tt></li>
<li><b>User Property</b>: <tt>excludeBuildFolders</tt></li>
<li><b>Default</b>: <tt>false</tt></li>
</ul><hr />
<p><b><a name="skip">skip</a>:</b></p>
<div>(no description)</div>
<ul>
<li><b>Type</b>: <tt>boolean</tt></li>
<li><b>Required</b>: <tt>No</tt></li>
<li><b>User Property</b>: <tt>spring.cloud.contract.verifier.skip</tt></li>
<li><b>Default</b>: <tt>false</tt></li>
</ul><hr />
<p><b><a name="source">source</a>:</b></p>
<div>Directory containing contracts written using the GroovyDSL
<p>This parameter is only used when goal is executed outside of
maven project.</p></div>
<ul>
<li><b>Type</b>: <tt>java.io.File</tt></li>
<li><b>Required</b>: <tt>No</tt></li>
<li><b>User Property</b>: <tt>contractsDirectory</tt></li>
<li><b>Default</b>: <tt>${basedir}</tt></li>
</ul><hr />
<p><b><a name="stubsDirectory">stubsDirectory</a>:</b></p>
<div>Directory where the generated WireMock stubs from Groovy DSL should
be placed. You can then mention them in your packaging task to
create jar with stubs</div>
<ul>
<li><b>Type</b>: <tt>java.io.File</tt></li>
<li><b>Required</b>: <tt>No</tt></li>
<li><b>Default</b>: <tt>${project.build.directory}/stubs/</tt></li>
</ul>
</div>
</div>
</div>
</div>
</div>
<hr/>
<footer>
<div class="container-fluid">
<div class="row-fluid">
<p >Copyright &copy; 2016&#x2013;2018
<a href="https://spring.io/">Spring</a>.
All rights reserved.
</p>
</div>
</div>
</footer>
</body>
</html>