java – Maven build fails with Spring-cloud-contract-verifier

java – Maven build fails with Spring-cloud-contract-verifier

It looks that you have no contracts under the default path (src/test/resources/contracts) which results in not copying then to target which results in the exception.

After a few days struggling to find the solution, I came to the conclusion that my Spring Boot version (1.5.10) is not compatible with Spring Cloud Contract Verifier (2.1.1), although I have not found any compatibility matrix on the web and it is just based on my experiment in this case. By migrating to Spring Boot 2.1.x the issue was resolved and it is working like a charm. Many thanks to Josh Long & Marcin Grzejszczak for the presentation in conference about Spring Contract.

https://www.youtube.com/watch?v=MDydAqL4mYE

java – Maven build fails with Spring-cloud-contract-verifier

To apply a temporary solution to the problem, just create a folder contracts under (src/test/resources). It should be (src/test/resources/contracts) after you have created it.
But you should implement contracts verifiers to satisfy your endpoints accordingly. I hope that helps.

Leave a Reply

Your email address will not be published. Required fields are marked *