# Spring Cloud Contract Verifier Maven Plugin –

## Spring Cloud Contract Maven Plugin

# Usage

## Converting Spring Cloud Contract DSL into WireMock stub mappings

    mvn org.springramework.cloud:spring-cloud-contract-maven-plugin:convert

or shortly [1]

    mvn spring-cloud-contract-verifier:convert

For more information please go to the Spring Cloud Contract Wiki or Plugin Documentation Site.

## Spring Cloud Contract Stub Runner

Run stubs mappings from current directory:

    mvn org.springramework.cloud:spring-cloud-contract-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</groupId>
                    <artifactId>spring-cloud-contract-maven-plugin</artifactId>
                    <version>${spring-cloud-verifier-plugin.version}</version>
                    <extensions>true</extensions>
                    <configuration>
                        <baseClassForTests>hello.BaseAccurest</baseClassForTests>
                    </configuration>
                </plugin>

1. Additional configuration inside `~/.m2/settings.xml` is required: `<pluginGroups><pluginGroup>io.codearte.Spring Cloud Contract</pluginGroup></pluginGroups>`.