I have spring-boot based application and pact-broker running in our enviroment. So I'm going to add some contract tests. I've put a few contacts on groovy dsl into project. I want to generate client stubs for pact-broker. According to documentation I have to put spring.factories file into META-INF and add implementation of StubGenerator interface. But my custom stub generator doesn't run during generateClientStubs task execution. I've tried to run gradle task in debug mode and I've seen only default DslToWireMockClientConverter in log file:
[org.springframework...RecursiveFilesConverter] Stub Generators [[org.springframework.cloud.contract.verifier.wiremock.DslToWireMockClientConverter@b03dde3]]
How can I add custom stub generator for pact based client stubs ?
You have to add the dependency with your packaged custom stub generator yo the classpath of the plugin. It has to be pre-built before the plugin gets executed.