How to build it
| You need to have all the necessary Groovy plugins installed for your IDE to properly resolve the sources. For example in Intellij IDEA having both Eclipse Groovy Compiler Plugin & GMavenPlus Intellij Plugin results in properly imported project. |
| Spring Cloud Contract builds Docker images. Remember to have Docker installed. |
| If you want to run the build in offline mode, you have to have Maven 3.5.2+ installed. |
Project structure
Here you can find the Spring Cloud Contract folder structure
├── config
├── docker
├── samples
├── scripts
├── specs
├── spring-cloud-contract-dependencies
├── spring-cloud-contract-shade
├── spring-cloud-contract-starters
├── spring-cloud-contract-stub-runner
├── spring-cloud-contract-stub-runner-boot
├── spring-cloud-contract-tools
├── spring-cloud-contract-verifier
├── spring-cloud-contract-wiremock
└── tests
-
config- folder contains setup for Spring Cloud Release Tools automated release process -
docker- folder contains docker images -
samples- folder contains test samples together with standalone ones used also to build documentation -
scripts- contains scripts to build and testSpring Cloud Contractwith Maven, Gradle and standalone projects -
specs- contains specifications for the Contract DSL. -
spring-cloud-contract-dependencies- contains Spring Cloud Contract BOM -
spring-cloud-contract-shade- shaded dependencies used by the plugins -
spring-cloud-contract-starters- contains Spring Cloud Contract Starters -
spring-cloud-contract-spec- contains specification modules (contains concept of a Contract) -
spring-cloud-contract-stub-runner- contains Stub Runner related modules -
spring-cloud-contract-stub-runner-boot- contains Stub Runner Boot app -
spring-cloud-contract-tools- Gradle and Maven plugin forSpring Cloud Contract Verifier -
spring-cloud-contract-verifier- core of theSpring Cloud Contract Verifierfunctionality -
spring-cloud-contract-wiremock- all WireMock related functionality -
tests- integration tests for different messaging technologies
Commands
To build the core functionality together with Maven Plugin you can run
./mvnw clean install -P integration
Calling that function will build core, Maven plugin, Gradle plugin and run end to end tests on the standalone samples in proper order (both for Maven and Gradle).
To build the Gradle Plugin only
cd spring-cloud-contract-tools/spring-cloud-contract-gradle-plugin
./gradlew clean build
Helpful scripts
We’re providing a couple of helpful scripts to build the project.
To build the project in parallel (by default uses 4 cores but you can change it)
./scripts/parallelBuild.sh
and with 8 cores
CORES=8 ./scripts/parallelBuild.sh
To build the project without any integration tests (by default uses 1 core)
./scripts/noIntegration.sh
and with 8 cores
CORES=8 ./scripts/noIntegration.sh
To generate the documentation (both the root one and the maven plugin one)
./scripts/generateDocs.sh