0
votes

In my spring cloud contract test I have already some remote stubs like after I followed the spring cloud contract docs https://cloud.spring.io/spring-cloud-contract/2.0.x/multi/multi__spring_cloud_contract_stub_runner.html

@AutoConfigureStubRunner(repositoryRoot = StubRunnerRepositoryRoot.URL, stubsMode = 
    StubsMode.REMOTE, ids = {
 "uk.co.blah.service:blah-service:+:stubs"...})

However, I would also like to have some local stubs

   stubsMode = StubsMode.LOCAL

So basically having some remote stubs and some local ones? Is that possible? Having multiple AutoConfigureStubRunner? It doesn't seem to work?

Thanks

1

1 Answers

0
votes

If you want to do local only, you need to ensure that you have them in your local m2. It will be enough for you to add that stubs JAR as a dependency in your project and it will be downloaded to your local .m2 upon building of the project. Then you can use LOCAL and it will work cause you have just downloaded the jar.