@Mojo(name="start",
requiresProject=true,
defaultPhase=PRE_INTEGRATION_TEST,
requiresDependencyResolution=TEST)
public class StartMojo
extends AbstractRunMojo
run goal, this does not block and
allows other goals to operate on the application. This goal is typically used in
integration test scenario where the application is started before a test suite and
stopped after.StopMojo| Constructor and Description |
|---|
StartMojo() |
| Modifier and Type | Method and Description |
|---|---|
<T> T |
execute(long wait,
int maxAttempts,
java.util.concurrent.Callable<T> callback)
Execute a task, retrying it on failure.
|
protected org.springframework.boot.maven.RunArguments |
resolveApplicationArguments()
Resolve the application arguments to use.
|
protected org.springframework.boot.maven.RunArguments |
resolveJvmArguments()
Resolve the JVM arguments to use.
|
protected void |
runWithForkedJvm(java.io.File workingDirectory,
java.util.List<java.lang.String> args,
java.util.Map<java.lang.String,java.lang.String> environmentVariables)
Run with a forked VM, using the specified command line arguments.
|
protected void |
runWithMavenJvm(java.lang.String startClassName,
java.lang.String... arguments)
Run with the current VM, using the specified arguments.
|
execute, getClassPathUrls, getJavaExecutable, isFork, logDisabledFork, resolveEnvVariablesfilterDependencies, getFilters, setExcludeGroupIds, setExcludes, setIncludesprotected void runWithForkedJvm(java.io.File workingDirectory,
java.util.List<java.lang.String> args,
java.util.Map<java.lang.String,java.lang.String> environmentVariables)
throws org.apache.maven.plugin.MojoExecutionException,
org.apache.maven.plugin.MojoFailureException
AbstractRunMojorunWithForkedJvm in class AbstractRunMojoworkingDirectory - the working directory of the forked JVMargs - the arguments (JVM arguments and application arguments)environmentVariables - the environment variablesorg.apache.maven.plugin.MojoExecutionException - in case of MOJO execution errorsorg.apache.maven.plugin.MojoFailureException - in case of MOJO failuresprotected org.springframework.boot.maven.RunArguments resolveApplicationArguments()
AbstractRunMojoresolveApplicationArguments in class AbstractRunMojoRunArguments defining the application argumentsprotected org.springframework.boot.maven.RunArguments resolveJvmArguments()
AbstractRunMojoresolveJvmArguments in class AbstractRunMojoRunArguments defining the JVM argumentsprotected void runWithMavenJvm(java.lang.String startClassName,
java.lang.String... arguments)
throws org.apache.maven.plugin.MojoExecutionException
AbstractRunMojorunWithMavenJvm in class AbstractRunMojostartClassName - the class to runarguments - the class argumentsorg.apache.maven.plugin.MojoExecutionException - in case of MOJO execution errorspublic <T> T execute(long wait,
int maxAttempts,
java.util.concurrent.Callable<T> callback)
throws java.lang.Exception
T - the result typewait - the wait timemaxAttempts - the maximum number of attemptscallback - the task to execute (possibly multiple times). The callback should
return null to indicate that another attempt should be madejava.lang.Exception - in case of execution errors