testCompile "com.github.tomakehurst:wiremock-standalone:2.6.0"
java.lang.NoSuchMethodError: javax.servlet.http.HttpServletRequest.isAsyncStarted()Z
2017-06-14 13:14:01.060 Received request to /mappings with body { "id" : "5e7eac71-6166-4bc9-9cf7-dd0cc33413d3", "request" : { "urlPathPattern" : "/service/validate_for_release", "method" : "GET", "queryParameters" : { "name" : { "equalTo" : "pact-gradle-plugin-test" }, "version" : { "equalTo" : "1.2345" } } }, "response" : { "status" : 200 }, "uuid" : "5e7eac71-6166-4bc9-9cf7-dd0cc33413d3"}String path = "/service/validate_for_release"
stubFor(get(urlPathMatching(path))
.withQueryParam("name", equalTo(artifactId))
.withQueryParam("version", equalTo(version))
.willReturn(aResponse().withStatus(200))
)
Bear in mind some libraries e.g. jetty bake the servlet api in.
public class TmpTest {
@Test
public void whereClass() {
System.out.println(HttpServletRequest.class.getProtectionDomain().getCodeSource().toString());
}
}
System.out.println(HttpServletRequest.class.getProtectionDomain().getCodeSource().toString());