Fork me on GitHub

Usage

Converting Accurest GroovyDSL into WireMock stub mappings

mvn org.springframework.cloud.contract:spring-cloud-contract-verifier-maven-plugin:convert

or shortly [1]

mvn spring-cloud-contract-verifier:convert

For more information please go to the Accurest Wiki or Plugin Documentation Site.

Accurest Stub Runner

Run stubs mappings from current directory:

mvn org.springframework.cloud.contract:spring-cloud-contract-verifier-maven-plugin:run

or shortly [1]

mvn spring-cloud-contract-verifier:run

Running stubs from repository

mvn spring-cloud-contract-verifier:run -Dstubs="org.springframework:gs-rest-service"

where org.springframework:gs-rest-service is artifact with stubs classifier contains wiremock mappings.

Project configuration

            <plugin>
                <groupId>org.springframework.cloud.contract</groupId>
                <artifactId>spring-cloud-contract-verifier-maven-plugin</artifactId>
                <version>${accurest-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>

1. Additional configuration inside ~/.m2/settings.xml is required: <pluginGroups><pluginGroup>io.codearte.accurest</pluginGroup></pluginGroups>.