Unresolved directive in <stdin> - include::{root_folder}/src/test/projects/complex-configuration/pom.xml[tags=plugin]
+diff --git a/spring-cloud-contract-maven-plugin/complex-content.html b/spring-cloud-contract-maven-plugin/complex-content.html new file mode 100644 index 0000000000..73aed2e1f1 --- /dev/null +++ b/spring-cloud-contract-maven-plugin/complex-content.html @@ -0,0 +1,320 @@ + + + +
+ + + + +
+
+
+
+
+
+
+
+
+
+ Sample more complex configuration for Java Project with JUnit tests.
+Unresolved directive in <stdin> - include::{root_folder}/src/test/projects/complex-configuration/pom.xml[tags=plugin]
+Unresolved directive in <stdin> - include::{root_folder}/src/test/projects/complex-configuration/src/test/java/com/blogspot/toomuchcoding/frauddetection/BaseAccurest.java[]
+Unresolved directive in <stdin> - include::{root_folder}/src/test/projects/complex-configuration/src/test/java/com/blogspot/toomuchcoding/frauddetection/matchers/CustomMatchers.java[]
+Unresolved directive in <stdin> - include::{root_folder}/src/test/projects/complex-configuration/src/test/contracts/shouldMarkClientAsNotFraud.groovy[]
+
+
+
+
+
+
+
+
+
+
+ Sample more complex configuration for Java Project with JUnit tests.
+ <plugin>
+ <groupId>org.springframework.cloud</groupId>
+ <artifactId>spring-cloud-contract-maven-plugin</artifactId>
+ <version>${spring-cloud-verifier-plugin.version}</version>
+ <executions>
+ <execution>
+ <goals>
+ <goal>convert</goal>
+ <goal>generateStubs</goal>
+ <goal>generateTests</goal>
+ </goals>
+ <configuration>
+ <contractsDirectory>src/test/accurest</contractsDirectory>
+ <basePackageForTests>com.blogspot.toomuchcoding.frauddetection</basePackageForTests>
+ <testMode>MOCKMVC</testMode>
+ <testFramework>JUNIT</testFramework>
+ <classifier>stubs</classifier>
+ <nameSuffixForTests>Test</nameSuffixForTests>
+ <ruleClassForTests>org.junit.rules.ErrorCollector</ruleClassForTests>
+ <staticImports>
+ <staticImport>com.blogspot.toomuchcoding.frauddetection.matchers.CustomMatchers.*</staticImport>
+ </staticImports>
+ <imports>
+ <import>com.blogspot.toomuchcoding.frauddetection.matchers.CustomMatchers</import>
+ </imports>
+ <ignoredFiles>
+ <ignoredFile>broken**</ignoredFile>
+ </ignoredFiles>
+ <excludedFiles>
+ <param>shouldMarkClientAsFraud.groovy</param>
+ </excludedFiles>
+ </configuration>
+ </execution>
+ </executions>
+ <configuration>
+ <baseClassForTests>com.blogspot.toomuchcoding.frauddetection.BaseAccurest</baseClassForTests>
+ </configuration>
+ </plugin>
+/**
+ *
+ * Copyright 2013-2016 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.blogspot.toomuchcoding.frauddetection;
+
+import com.jayway.restassured.module.mockmvc.RestAssuredMockMvc;
+
+import org.junit.Before;
+
+public class BaseAccurest {
+
+ @Before
+ public void setup() {
+ RestAssuredMockMvc.standaloneSetup(new FraudDetectionController());
+ }
+
+}
+/**
+ *
+ * Copyright 2013-2016 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.blogspot.toomuchcoding.frauddetection.matchers;
+
+import org.junit.Assert;
+
+public class CustomMatchers {
+
+ public static void assertThatRejectionReasonIsNull(String rejectionReason) {
+ Assert.assertNull(rejectionReason);
+ }
+
+}
+/**
+ *
+ * Copyright 2013-2016 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+org.springframework.cloud.contract.spec.Contract.make {
+ request {
+ method 'PUT'
+ url '/fraudcheck'
+ body("""
+ {
+ "clientPesel":"${value(client(regex('[0-9]{10}')), server('1234567890'))}",
+ "loanAmount":123.123
+ }
+ """
+ )
+ headers {
+ header('Content-Type', 'application/vnd.fraud.v1+json')
+ }
+
+ }
+ response {
+ status 200
+ body(
+ fraudCheckStatus: "OK",
+ rejectionReason: $(client(null), server(execute('assertThatRejectionReasonIsNull($it)')))
+ )
+ headers {
+ header('Content-Type': 'application/vnd.fraud.v1+json')
+ }
+ }
+
+}
+
+
+
+
+
+
+
+
+
+
+ Full name:
+ +org.springframework.cloud:spring-cloud-contract-maven-plugin:1.0.0.BUILD-SNAPSHOT:convert
+ +Description:
+ +This goal allow to generate `stubs-jar` or execute +`spring-cloud-contract-verifier:run` with generated WireMock +mappings.
Attributes:
+ +| Name | + +Type | + +Since | + +Description | +
|---|---|---|---|
| contractsDirectory | + +File | + +- | + +Directory containing Spring Cloud Contract Verifier contracts
+written using the GroovyDSL Default value is: ${basedir}/src/test/resources/contracts. |
+
| destination | + +File | + +- | + +(no description) Default value is: ${basedir}. User property is: stubsDirectory. |
+
| outputDirectory | + +File | + +- | + +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 Default value is: ${project.build.directory}/stubs. |
+
| skip | + +boolean | + +- | + +(no description) Default value is: false. User property is: spring.cloud.contract.verifier.skip. |
+
| source | + +File | + +- | + +Directory containing contracts written using the GroovyDSL
+
+ This parameter is only used when goal is executed outside of +maven project. Default value is: ${basedir}. User property is: contractsDirectory. |
+
skip:
+ +This parameter is only used when goal is executed outside of +maven project.
+
+
+
+
+
+
+
+
+
+ The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:
+| GroupId | +ArtifactId | +Version | +Type | +Licenses |
|---|---|---|---|---|
| ch.qos.logback | +logback-core | +1.1.3 | +jar | +Eclipse Public License - v 1.0-GNU Lesser General Public License |
| org.apache.maven | +maven-archiver | +3.0.0 | +jar | +Apache License, Version 2.0 |
| org.apache.maven.shared | +maven-filtering | +3.1.0 | +jar | +Apache License, Version 2.0 |
| org.codehaus.plexus | +plexus-archiver | +3.1 | +jar | +The Apache Software License, Version 2.0 |
| org.springframework.cloud | +spring-cloud-contract-stub-runner | +1.0.0.BUILD-SNAPSHOT | +jar | +Apache License, Version 2.0 |
| org.springframework.cloud | +spring-cloud-contract-verifier-converters | +1.0.0.BUILD-SNAPSHOT | +jar | +Apache License, Version 2.0 |
| org.springframework.cloud | +spring-cloud-contract-verifier-core | +1.0.0.BUILD-SNAPSHOT | +jar | +Apache License, Version 2.0 |
The following is a list of test dependencies for this project. These dependencies are only required to compile and run unit tests for the application:
+| GroupId | +ArtifactId | +Version | +Type | +Licenses |
|---|---|---|---|---|
| io.takari.maven.plugins | +takari-plugin-integration-testing | +2.9.0 | +pom | +The Eclipse Public License, Version 1.0 |
| io.takari.maven.plugins | +takari-plugin-testing | +2.9.0 | +jar | +The Eclipse Public License, Version 1.0 |
| junit | +junit | +4.12 | +jar | +Eclipse Public License 1.0 |
| org.apache.maven | +maven-compat | +3.2.5 | +jar | +Apache License, Version 2.0 |
| org.assertj | +assertj-core | +2.4.0 | +jar | +Apache License, Version 2.0 |
| org.slf4j | +slf4j-simple | +1.7.12 | +jar | +MIT License |
The following is a list of provided dependencies for this project. These dependencies are required to compile the application, but should be provided by default when using the library:
+| GroupId | +ArtifactId | +Version | +Type | +Licenses |
|---|---|---|---|---|
| javax.inject | +javax.inject | +1 | +jar | +The Apache Software License, Version 2.0 |
| org.apache.maven | +maven-core | +3.2.5 | +jar | +Apache License, Version 2.0 |
| org.apache.maven | +maven-plugin-api | +3.2.5 | +jar | +Apache License, Version 2.0 |
| org.apache.maven.plugin-tools | +maven-plugin-annotations | +3.4 | +jar | +Apache License, Version 2.0 |
| org.eclipse.aether | +aether-api | +1.1.0 | +jar | +Eclipse Public License, Version 1.0 |
The following is a list of transitive dependencies for this project. Transitive dependencies are the dependencies of the project dependencies.
+The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:
+The following is a list of test dependencies for this project. These dependencies are only required to compile and run unit tests for the application:
+| GroupId | +ArtifactId | +Version | +Type | +Licenses |
|---|---|---|---|---|
| io.takari.m2e.workspace | +org.eclipse.m2e.workspace.cli | +0.4.0 | +jar | +Eclipse Public License - v 1.0 |
| org.apache.commons | +commons-exec | +1.2 | +jar | +The Apache Software License, Version 2.0 |
| org.apache.maven.wagon | +wagon-provider-api | +2.8 | +jar | +Apache License, Version 2.0 |
| org.hamcrest | +hamcrest-core | +1.3 | +jar | +New BSD License |
The following is a list of provided dependencies for this project. These dependencies are required to compile the application, but should be provided by default when using the library:
+Apache Public License 2.0: Plexus Cipher: encryption/decryption Component, Plexus Security Dispatcher Component, plexus-build-api
+The Apache License, Version 2.0: jsonassert
+Eclipse Public License 1.0: JUnit
+The Eclipse Public License, Version 1.0: takari-plugin-integration-testing, takari-plugin-testing
+MIT License: JCL 1.1.1 implemented over SLF4J, SLF4J API Module, SLF4J Simple Binding, args4j
+The JSON License: JSON in Java
+Public Domain: AOP alliance
+GNU Lesser General Public License: Logback Core Module
+New BSD License: Hamcrest Core
+Eclipse Public License, Version 1.0: Aether API, Aether Connector Basic, Aether Implementation, Aether SPI, Aether Transport File, Aether Transport HTTP, Aether Utilities, org.eclipse.sisu.inject, org.eclipse.sisu.plexus
+BSD: ASM Core, Automaton
+The BSD 3-Clause License: org.xmlunit:xmlunit-legacy
+Apache License 2.0: snappy
+Apache License, Version 2.0: Apache Commons Codec, Apache Commons Compress, Apache HttpClient, Apache HttpCore, Apache Maven Archiver, Apache Maven Filtering, Apache Maven Shared Utils, Apache Maven Wagon :: API, AssertJ fluent assertions, CDI APIs, Maven Aether Provider, Maven Artifact, Maven Compat, Maven Core, Maven Model, Maven Model Builder, Maven Plugin API, Maven Plugin Tools Java 5 Annotations, Maven Repository Metadata Model, Maven Settings, Maven Settings Builder, Spring Boot, Spring Boot AutoConfigure, Spring Boot Test, Spring Boot Test Auto-Configure, Spring Cloud Contract Spec, Spring Cloud Contract Stub Runner, Spring Cloud Contract Verifier Converters, Spring Cloud Contract Verifier Core, Spring Cloud Contract Verifier Maven Plugin, Spring Cloud Contract Verifier Messaging Core, Spring Cloud Contract Verifier Testing Utils
+COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0: JSR-250 Common Annotations for the JavaTM Platform
+The Apache Software License, Version 2.0: ASM based accessors helper used by json-smart, Apache Commons Collections, Apache Commons Exec, Apache Commons Lang, Apache Groovy, Commons IO, FindBugs-jsr305, Guava: Google Core Libraries for Java, JSON Small and Fast Parser, JSONassert, Jackson-annotations, Jackson-core, Json Path, Plexus :: Component Annotations, Plexus Archiver Component, Plexus Classworlds, Plexus Common Utilities, Plexus IO Components, Plexus Interpolation API, Sisu Guice - Core Library, Spring AOP, Spring Beans, Spring Context, Spring Core, Spring Expression Language (SpEL), WireMock, jackson-databind, javax.inject, org.xmlunit:xmlunit-core, zjsonpatch
+Eclipse Public License - v 1.0: Logback Core Module, m2e-workspace
| Filename | +Size | +Entries | +Classes | +Packages | +Java Version | +Debug Information |
|---|---|---|---|---|---|---|
| aopalliance-1.0.jar | +4.5 kB | +15 | +9 | +2 | +1.3 | +Yes |
| args4j-2.32.jar | +153.9 kB | +163 | +72 | +2 | +1.5 | +Yes |
| logback-core-1.1.3.jar | +455 kB | +410 | +365 | +35 | +1.6 | +Yes |
| jackson-annotations-2.8.0.jar | +55.8 kB | +74 | +62 | +1 | +1.6 | +Yes |
| jackson-core-2.8.0.jar | +280 kB | +117 | +94 | +9 | +1.6 | +Yes |
| jackson-databind-2.8.0.jar | +1.2 MB | +615 | +581 | +20 | +1.7 | +Yes |
| zjsonpatch-0.2.1.jar | +18.7 kB | +20 | +10 | +1 | +1.6 | +Yes |
| wiremock-2.1.7.jar | +323.6 kB | +292 | +271 | +15 | +1.7 | +Yes |
| jsr305-2.0.1.jar | +31.9 kB | +70 | +34 | +3 | +1.5 | +Yes |
| guava-18.0.jar | +2.3 MB | +1719 | +1690 | +17 | +1.6 | +Yes |
| json-path-2.2.0.jar | +207.1 kB | +176 | +160 | +11 | +1.6 | +Yes |
| jsonassert-0.4.7.jar | +13.2 kB | +17 | +12 | +1 | +1.7 | +Yes |
| commons-codec-1.10.jar | +284.2 kB | +238 | +92 | +6 | +1.6 | +Yes |
| commons-io-2.0.jar | +159.2 kB | +122 | +104 | +6 | +1.5 | +Yes |
| automaton-1.11-8.jar | +176.3 kB | +206 | +25 | +1 | +1.5 | +No |
| org.eclipse.m2e.workspace.cli-0.4.0.jar | +17.9 kB | +25 | +5 | +2 | +1.7 | +Yes |
| takari-plugin-integration-testing-2.9.0.pom | +1.6 kB | +- | +- | +- | +- | +- |
| takari-plugin-testing-2.9.0.jar | +80.8 kB | +55 | +41 | +3 | +1.7 | +Yes |
| jsr250-api-1.0.jar | +5.8 kB | +16 | +11 | +2 | +1.5 | +Yes |
| cdi-api-1.0.jar | +44.9 kB | +92 | +75 | +7 | +1.5 | +Yes |
| javax.inject-1.jar | +2.5 kB | +8 | +6 | +1 | +1.5 | +No |
| junit-4.12.jar | +314.9 kB | +323 | +286 | +30 | +1.5 | +Yes |
| accessors-smart-1.1.jar | +80.7 kB | +53 | +38 | +4 | +1.6 | +Yes |
| json-smart-2.2.1.jar | +120.5 kB | +107 | +93 | +5 | +1.6 | +Yes |
| commons-collections4-4.0.jar | +610.3 kB | +459 | +431 | +16 | +1.5 | +Yes |
| commons-compress-1.10.jar | +409.5 kB | +256 | +221 | +23 | +1.5 | +Yes |
| commons-exec-1.2.jar | +53.9 kB | +52 | +36 | +4 | +1.3 | +Yes |
| commons-lang3-3.3.jar | +412.6 kB | +241 | +217 | +12 | +1.6 | +Yes |
| httpclient-4.5.2.jar | +736.7 kB | +504 | +463 | +24 | +1.6 | +Yes |
| httpcore-4.4.5.jar | +327.4 kB | +283 | +253 | +17 | +1.6 | +Yes |
| maven-aether-provider-3.3.9.jar | +66.9 kB | +43 | +26 | +1 | +1.7 | +Yes |
| maven-archiver-3.0.0.jar | +22.5 kB | +19 | +5 | +1 | +1.6 | +Yes |
| maven-artifact-3.2.5.jar | +55.1 kB | +57 | +32 | +11 | +1.6 | +Yes |
| maven-compat-3.2.5.jar | +286.7 kB | +211 | +159 | +29 | +1.6 | +Yes |
| maven-core-3.2.5.jar | +608.2 kB | +463 | +372 | +51 | +1.6 | +Yes |
| maven-model-3.2.5.jar | +160.8 kB | +67 | +50 | +3 | +1.6 | +Yes |
| maven-model-builder-3.2.5.jar | +170.2 kB | +148 | +115 | +16 | +1.6 | +Yes |
| maven-plugin-api-3.2.5.jar | +46.1 kB | +46 | +25 | +6 | +1.6 | +Yes |
| maven-repository-metadata-3.2.5.jar | +26 kB | +25 | +7 | +2 | +1.6 | +Yes |
| maven-settings-3.2.5.jar | +43 kB | +33 | +17 | +2 | +1.6 | +Yes |
| maven-settings-builder-3.2.5.jar | +43.7 kB | +53 | +32 | +5 | +1.6 | +Yes |
| maven-plugin-annotations-3.4.jar | +14.2 kB | +22 | +7 | +1 | +1.5 | +Yes |
| maven-filtering-3.1.0.jar | +50.7 kB | +39 | +22 | +1 | +1.6 | +Yes |
| maven-shared-utils-3.0.0.jar | +154.7 kB | +101 | +77 | +9 | +1.6 | +Yes |
| wagon-provider-api-2.8.jar | +52.6 kB | +60 | +39 | +8 | +1.5 | +Yes |
| assertj-core-2.4.0.jar | +900.7 kB | +730 | +692 | +27 | +1.7 | +Yes |
| groovy-2.4.7.jar | +4.6 MB | +3257 | +3123 | +85 | +1.6 | +Yes |
| groovy-json-2.4.7.jar | +128 kB | +70 | +62 | +2 | +1.6 | +Yes |
| groovy-nio-2.4.7.jar | +19.3 kB | +13 | +2 | +1 | +1.7 | +Yes |
| groovy-xml-2.4.7.jar | +215.5 kB | +144 | +125 | +7 | +1.6 | +Yes |
| plexus-archiver-3.1.jar | +178.2 kB | +152 | +121 | +16 | +1.6 | +Yes |
| plexus-classworlds-2.5.2.jar | +52.7 kB | +52 | +37 | +5 | +1.6 | +Yes |
| plexus-component-annotations-1.5.5.jar | +4.2 kB | +15 | +3 | +1 | +1.5 | +No |
| plexus-interpolation-1.21.jar | +62.5 kB | +60 | +44 | +6 | +1.5 | +Yes |
| plexus-io-2.7.1.jar | +85.8 kB | +92 | +71 | +7 | +1.5 | +Yes |
| plexus-utils-3.0.22.jar | +244.9 kB | +129 | +104 | +9 | +1.5 | +Yes |
| aether-api-1.1.0.jar | +136.4 kB | +149 | +128 | +11 | +1.5 | +Yes |
| aether-connector-basic-1.1.0.jar | +36.7 kB | +34 | +19 | +1 | +1.5 | +Yes |
| aether-impl-1.1.0.jar | +172.8 kB | +114 | +96 | +4 | +1.5 | +Yes |
| aether-spi-1.1.0.jar | +30.7 kB | +54 | +34 | +8 | +1.5 | +Yes |
| aether-transport-file-1.1.0.jar | +8.9 kB | +19 | +4 | +1 | +1.5 | +Yes |
| aether-transport-http-1.1.0.jar | +36.7 kB | +35 | +20 | +1 | +1.5 | +Yes |
| aether-util-1.0.0.v20140518.jar | +145.8 kB | +125 | +100 | +13 | +1.5 | +Yes |
| org.eclipse.sisu.inject-0.3.0.M1.jar | +340.2 kB | +273 | +256 | +8 | +1.5 | +Yes |
| org.eclipse.sisu.plexus-0.3.0.M1.jar | +200.6 kB | +197 | +165 | +20 | +1.5 | +Yes |
| hamcrest-core-1.3.jar | +45 kB | +52 | +45 | +3 | +1.5 | +Yes |
| snappy-0.4.jar | +58 kB | +34 | +24 | +1 | +1.6 | +Yes |
| json-20140107.jar | +65 kB | +44 | +34 | +2 | +1.2 | +Yes |
| asm-5.0.3.jar | +53.2 kB | +30 | +25 | +2 | +1.2 | +No |
| jsonassert-1.2.3.jar | +27.7 kB | +30 | +19 | +2 | +1.6 | +Yes |
| jcl-over-slf4j-1.7.21.jar | +16.4 kB | +23 | +9 | +2 | +1.5 | +Yes |
| slf4j-api-1.7.21.jar | +41.1 kB | +46 | +34 | +4 | +1.5 | +Yes |
| slf4j-simple-1.7.12.jar | +10.7 kB | +16 | +6 | +1 | +1.5 | +Yes |
| plexus-build-api-0.0.7.jar | +8.5 kB | +19 | +4 | +1 | +1.4 | +Yes |
| plexus-cipher-1.4.jar | +13.5 kB | +20 | +6 | +1 | +1.4 | +Yes |
| plexus-sec-dispatcher-1.3.jar | +28.6 kB | +31 | +13 | +3 | +1.4 | +Yes |
| sisu-guice-3.2.3-no_aop.jar | +397.8 kB | +329 | +314 | +8 | +1.6 | +Yes |
| spring-aop-4.3.2.BUILD-SNAPSHOT.jar | +379.8 kB | +306 | +269 | +17 | +1.6 | +Yes |
| spring-beans-4.3.2.BUILD-SNAPSHOT.jar | +754.4 kB | +459 | +404 | +15 | +1.6 | +Yes |
| spring-context-4.3.2.BUILD-SNAPSHOT.jar | +1.1 MB | +889 | +767 | +66 | +1.6 | +Yes |
| spring-core-4.3.1.BUILD-SNAPSHOT.jar | +1.1 MB | +831 | +784 | +40 | +1.6 | +Yes |
| spring-expression-4.3.2.BUILD-SNAPSHOT.jar | +263.8 kB | +156 | +142 | +6 | +1.6 | +Yes |
| spring-boot-1.4.0.BUILD-SNAPSHOT.jar | +634.1 kB | +516 | +441 | +41 | +1.6 | +Yes |
| spring-boot-autoconfigure-1.4.0.BUILD-SNAPSHOT.jar | +928.6 kB | +846 | +757 | +73 | +1.6 | +Yes |
| spring-boot-test-1.4.0.BUILD-SNAPSHOT.jar | +140.2 kB | +126 | +102 | +11 | +1.6 | +Yes |
| spring-boot-test-autoconfigure-1.4.0.BUILD-SNAPSHOT.jar | +90.4 kB | +99 | +76 | +9 | +1.6 | +Yes |
| spring-cloud-contract-spec-1.0.0.BUILD-SNAPSHOT.jar | +113.5 kB | +71 | +53 | +4 | +1.7 | +Yes |
| spring-cloud-contract-stub-runner-1.0.0.BUILD-SNAPSHOT.jar | +128.9 kB | +83 | +70 | +2 | +1.7 | +Yes |
| spring-cloud-contract-verifier-converters-1.0.0.BUILD-SNAPSHOT.jar | +37.7 kB | +33 | +19 | +2 | +1.8 | +Yes |
| spring-cloud-contract-verifier-core-1.0.0.BUILD-SNAPSHOT.jar | +287.6 kB | +145 | +127 | +6 | +1.7 | +Yes |
| spring-cloud-contract-verifier-messaging-core-1.0.0.BUILD-SNAPSHOT.jar | +11.1 kB | +26 | +11 | +3 | +1.7 | +Yes |
| spring-cloud-contract-verifier-testing-utils-1.0.0.BUILD-SNAPSHOT.jar | +4.5 kB | +14 | +1 | +1 | +1.7 | +Yes |
| xmlunit-core-2.1.1.jar | +153.7 kB | +160 | +144 | +8 | +1.6 | +Yes |
| xmlunit-legacy-2.1.1.jar | +124.8 kB | +100 | +86 | +5 | +1.6 | +Yes |
| Total | +Size | +Entries | +Classes | +Packages | +Java Version | +Debug Information |
| 94 | +25.3 MB | +19363 | +16734 | +998 | +1.8 | +89 |
| compile: 68 | +compile: 21.5 MB | +compile: 16040 | +compile: 13952 | +compile: 758 | +- | +compile: 65 |
| test: 10 | +test: 1.8 MB | +test: 1524 | +test: 1309 | +test: 107 | +- | +test: 9 |
| provided: 16 | +provided: 2 MB | +provided: 1799 | +provided: 1473 | +provided: 133 | +- | +provided: 15 |
+
+
+
+
+
+
+
+
+
+ <dependency> + <groupId>org.springframework.cloud</groupId> + <artifactId>spring-cloud-contract-maven-plugin</artifactId> + <version>1.0.0.BUILD-SNAPSHOT</version> + <type>maven-plugin</type> +</dependency>
'org.springframework.cloud:spring-cloud-contract-maven-plugin:maven-plugin:1.0.0.BUILD-SNAPSHOT'
<dependency org="org.springframework.cloud" name="spring-cloud-contract-maven-plugin" rev="1.0.0.BUILD-SNAPSHOT"> + <artifact name="spring-cloud-contract-maven-plugin" type="maven-plugin" /> +</dependency>
@Grapes( +@Grab(group='org.springframework.cloud', module='spring-cloud-contract-maven-plugin', version='1.0.0.BUILD-SNAPSHOT') +)
compile 'org.springframework.cloud:spring-cloud-contract-maven-plugin:1.0.0.BUILD-SNAPSHOT'
+
+
+
+
+
+
+
+
+
+ The following is a list of compile dependencies in the DependencyManagement of this project. These dependencies can be included in the submodules to compile and run the submodule:
+The following is a list of test dependencies in the DependencyManagement of this project. These dependencies can be included in the submodules to compile and run unit tests for the submodule:
+| GroupId | +ArtifactId | +Version | +Type | +License |
|---|---|---|---|---|
| org.apache.curator | +curator-test | +2.10.0 | +jar | +The Apache Software License, Version 2.0 |
| org.assertj | +assertj-core | +2.4.1 | +jar | +Apache License, Version 2.0 |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Full name:
+ +org.springframework.cloud:spring-cloud-contract-maven-plugin:1.0.0.BUILD-SNAPSHOT:generateStubs
+ +Description:
+ +Attributes:
+ +| Name | + +Type | + +Since | + +Description | +
|---|---|---|---|
| attachContracts | + +boolean | + +- | + +(no description) Default value is: true. |
+
| classifier | + +String | + +- | + +(no description) Default value is: stubs. |
+
| outputDirectory | + +File | + +- | + +(no description) Default value is: ${project.build.directory}/stubs. User property is: stubsDirectory. |
+
| skip | + +boolean | + +- | + +Set this to "true" to bypass Verifier execution.. Default value is: false. User property is: spring.cloud.contract.verifier.skip. |
+
skip:
+ +
+
+
+
+
+
+
+
+
+
+ Full name:
+ +org.springframework.cloud:spring-cloud-contract-maven-plugin:1.0.0.BUILD-SNAPSHOT:generateTests
+ +Description:
+ +Attributes:
+ +| Name | + +Type | + +Since | + +Description | +
|---|---|---|---|
| baseClassForTests | + +String | + +- | + +(no description) |
+
| basePackageForTests | + +String | + +- | + +(no description) Default value is: org.springframework.cloud.contract.verifier.tests. |
+
| contractsDirectory | + +File | + +- | + +(no description) Default value is: ${project.basedir}/src/test/resources/contracts. User property is: spring.cloud.contract.verifier.contractsDirectory. |
+
| excludedFiles | + +List | + +- | + +Patterns that should not be taken into account for processing |
+
| generatedTestSourcesDir | + +File | + +- | + +(no description) Default value is: ${project.build.directory}/generated-test-sources/contracts. |
+
| ignoredFiles | + +List | + +- | + +Patterns for which Spring Cloud Contract Verifier should generate
+@Ignored tests |
+
| imports | + +String[] | + +- | + +Imports that should be added to generated tests |
+
| nameSuffixForTests | + +String | + +- | + +(no description) |
+
| ruleClassForTests | + +String | + +- | + +(no description) |
+
| skip | + +boolean | + +- | + +(no description) Default value is: false. User property is: spring.cloud.contract.verifier.skip. |
+
| staticImports | + +String[] | + +- | + +Static imports that should be added to generated tests |
+
| testFramework | + +TestFramework | + +- | + +(no description) Default value is: JUNIT. |
+
| testMode | + +TestMode | + +- | + +(no description) Default value is: MOCKMVC. |
+
skip:
+ +
+
+
+
+
+
+
+
+
+
+ Full name:
+ +org.springframework.cloud:spring-cloud-contract-maven-plugin:1.0.0.BUILD-SNAPSHOT:help
+ +Description:
+ +Attributes:
+ +| Name | + +Type | + +Since | + +Description | +
|---|---|---|---|
| detail | + +boolean | + +- | + +If true, display all settable properties for each
+goal. Default value is: false. User property is: detail. |
+
| goal | + +String | + +- | + +The name of the goal for which to show help. If unspecified, all
+goals will be displayed. User property is: goal. |
+
| indentSize | + +int | + +- | + +The number of spaces per indentation level, should be positive. Default value is: 2. User property is: indentSize. |
+
| lineLength | + +int | + +- | + +The maximum length of a display line, should be positive. Default value is: 80. User property is: lineLength. |
+
goal:
+ +
+
+
+
+
+
+
+
+
+
+ Just to make long story short - Spring Cloud Contract Verifier is a tool that enables Consumer Driven Contract (CDC) development of JVM-based applications.
+Stubs mappings to be used by WireMock when doing integration testing on the client code (client tests).
+Acceptance tests used to verify if server-side implementation of the API is compliant with the contract (server tests).
+Spring Cloud Contract Verifier moves TDD to the level of software architecture.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ | t |
+
+
+
+
+
+
+
+ Sample minimal configuration for Java Project with JUnit tests.
+ <dependency>
+ <groupId>com.jayway.restassured</groupId>
+ <artifactId>rest-assured</artifactId>
+ <version>2.9.0</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.jayway.restassured</groupId>
+ <artifactId>spring-mock-mvc</artifactId>
+ <version>2.9.0</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.toomuchcoding.jsonassert</groupId>
+ <artifactId>jsonassert</artifactId>
+ <version>0.4.7</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.assertj</groupId>
+ <artifactId>assertj-core</artifactId>
+ <version>2.4.1</version>
+ <scope>test</scope>
+ </dependency>
+ <plugin>
+ <groupId>org.springframework.cloud</groupId>
+ <artifactId>spring-cloud-contract-maven-plugin</artifactId>
+ <version>${spring-cloud-verifier-plugin.version}</version>
+ <executions>
+ <execution>
+ <goals>
+ <goal>convert</goal>
+ <goal>generateStubs</goal>
+ <goal>generateTests</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <baseClassForTests>hello.BaseAccurest</baseClassForTests>
+ </configuration>
+ </plugin>
+/**
+ *
+ * Copyright 2013-2016 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package hello;
+
+import com.jayway.restassured.module.mockmvc.RestAssuredMockMvc;
+
+import org.junit.Before;
+
+public class BaseAccurest {
+
+ @Before
+ public void setup() {
+ RestAssuredMockMvc.standaloneSetup(new GreetingController());
+ }
+
+}
+