uk.co.automatictester.wiremock.maven.plugin.mojo.WireMockStopMojo Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of wiremock-maven-plugin Show documentation
Show all versions of wiremock-maven-plugin Show documentation
Run WireMock as part of Maven lifecycle
package uk.co.automatictester.wiremock.maven.plugin.mojo;
import org.apache.maven.plugins.annotations.LifecyclePhase;
import org.apache.maven.plugins.annotations.Mojo;
import uk.co.automatictester.wiremock.maven.plugin.server.WireMockServer;
@Mojo(name = "stop", defaultPhase = LifecyclePhase.POST_INTEGRATION_TEST)
public class WireMockStopMojo extends ConfigurationMojo {
@Override
public void execute() {
getLog().info("Stopping WireMock...");
WireMockServer wireMock = WireMockServer.getInstance();
wireMock.stop();
}
}