Sometimes people want to use methods like `addMockServiceRequestListener`, which are not static. But there is no any notes about `WireMockServer` in spring-cloud-wiremock documentation.
I saw how the developers did not know about it and made a mistake.
They mixed junit4 and junit5 even for new services, because `WireMockRule` inherits from `WireMockServer` and provides non static methods.
This situation may seem funny, but many can get into it.
without this change Aether, when having both local and remote JARs, always picks the local one, even though we don't want it to. There seems to be no way to change it via an API. We had a check in Spring Cloud Contract to throw an exception when we wanted a remote JAR but the local one was fetched. You could have changed it by providing a system property or a plugin property called `skipSnapshotCheck` or `contractsSkipSnapshotCheck`
with this change we're deprecating that flag since we're moving this logic to the internals of how we integrate with Aether. If the problem was that there was both the local and the remote JAR, what we could do is get rid of the local JAR. Obviously we don't want to remove it so what we're doing is when someone provides the REMOTE stub mode, we're creating a temporary directory and we're temporarily pointing Aether to that directory as our local m2. Since it's empty, Aether will not assume that we have any stubs stored locally. Thus, we will never have conflicts of remote vs local jars.
fixes gh-643
additional links:
- http://maven.40175.n5.nabble.com/Resolving-an-Artifact-from-Remote-Repository-instead-of-Local-td5875134.html
- https://stackoverflow.com/questions/9123004/maven-is-it-possible-to-override-location-of-local-repository-via-the-use-of-co