|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.maven.plugin.AbstractMojo
org.mockserver.maven.MockServerAbstractMojo
public abstract class MockServerAbstractMojo
| Field Summary | |
|---|---|
protected List<String> |
compileClasspath
The main classpath location of the project using this plugin |
protected List<org.apache.maven.model.Dependency> |
dependencies
The plugin dependencies |
protected static InstanceHolder |
embeddedJettyHolder
Holds reference to jetty across plugin execution |
protected String |
initializationClass
To enable the creation of default expectations that are generic across all tests or mocking scenarios a class can be specified to initialize expectations in the MockServer, this class must implement org.mockserver.initialize.ExpectationInitializer interface, the initializeExpectations(MockServerClient mockServerClient) method will be called once the MockServer has been started (but ONLY if serverPort has been set), however it should be noted that it is generally better practice to create all expectations locally in each test (or test class) for clarity, simplicity and to avoid brittle tests |
protected String |
logLevel
Logging level |
protected boolean |
pipeLogToConsole
If true the console of the forked JVM will be piped to the Maven console |
protected Integer |
proxyPort
The port to run the proxy on |
protected String |
serverPort
The port to run MockServer on |
protected boolean |
skip
Skip the plugin execution completely |
protected List<String> |
testClasspath
The test classpath location of the project using this plugin |
protected Integer |
timeout
Timeout to wait before stopping MockServer, to run MockServer indefinitely do not set a value |
| Fields inherited from interface org.apache.maven.plugin.Mojo |
|---|
ROLE |
| Constructor Summary | |
|---|---|
MockServerAbstractMojo()
|
|
| Method Summary | |
|---|---|
protected org.mockserver.initialize.ExpectationInitializer |
createInitializer()
|
protected InstanceHolder |
getEmbeddedJettyHolder()
|
protected Integer[] |
getServerPorts()
|
| Methods inherited from class org.apache.maven.plugin.AbstractMojo |
|---|
getLog, getPluginContext, setLog, setPluginContext |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.apache.maven.plugin.Mojo |
|---|
execute |
| Field Detail |
|---|
protected static InstanceHolder embeddedJettyHolder
@Parameter(property="mockserver.serverPort",
defaultValue="")
protected String serverPort
@Parameter(property="mockserver.proxyPort",
defaultValue="-1")
protected Integer proxyPort
@Parameter(property="mockserver.timeout") protected Integer timeout
@Parameter(property="mockserver.logLevel",
defaultValue="INFO")
protected String logLevel
@Parameter(property="mockserver.skip",
defaultValue="false")
protected boolean skip
@Parameter(property="mockserver.pipeLogToConsole",
defaultValue="false")
protected boolean pipeLogToConsole
@Parameter(property="mockserver.initializationClass") protected String initializationClass
@Parameter(property="project.compileClasspathElements",
required=true,
readonly=true)
protected List<String> compileClasspath
@Parameter(property="project.testClasspathElements",
required=true,
readonly=true)
protected List<String> testClasspath
@Parameter(property="pluginDescriptor.plugin.dependencies",
required=true,
readonly=true)
protected List<org.apache.maven.model.Dependency> dependencies
| Constructor Detail |
|---|
public MockServerAbstractMojo()
| Method Detail |
|---|
protected Integer[] getServerPorts()
protected InstanceHolder getEmbeddedJettyHolder()
protected org.mockserver.initialize.ExpectationInitializer createInitializer()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||