org.mockserver.maven.MockServerStartMojo Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mockserver-maven-plugin Show documentation
Show all versions of mockserver-maven-plugin Show documentation
A maven plugin to start and stop the MockServer
package org.mockserver.maven;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugins.annotations.LifecyclePhase;
import org.apache.maven.plugins.annotations.Mojo;
/**
* Start the MockServer in the initialize phase of the build and continue build so that tests can run that rely on the MockServer
*
* @author jamesdbloom
*/
@Mojo(name = "start", defaultPhase = LifecyclePhase.INITIALIZE)
public class MockServerStartMojo extends MockServerAbstractMojo {
public void execute() throws MojoExecutionException {
if (skip) {
getLog().info("Skipping plugin execution");
} else {
getLog().info("Starting MockServer on port " + port);
getEmbeddedJettyHolder().start(port, securePort, logLevel);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy