@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)
Deprecated.
|
execute, getClassPathUrls, getJavaExecutable, isFork, logDisabledFork, resolveEnvVariables
filterDependencies, getFilters, setExcludeGroupIds, setExcludes, setIncludes
protected 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
AbstractRunMojo
runWithForkedJvm
in class AbstractRunMojo
workingDirectory
- 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()
AbstractRunMojo
resolveApplicationArguments
in class AbstractRunMojo
RunArguments
defining the application argumentsprotected org.springframework.boot.maven.RunArguments resolveJvmArguments()
AbstractRunMojo
resolveJvmArguments
in class AbstractRunMojo
RunArguments
defining the JVM arguments@Deprecated protected void runWithMavenJvm(java.lang.String startClassName, java.lang.String... arguments) throws org.apache.maven.plugin.MojoExecutionException
AbstractRunMojo
runWithMavenJvm
in class AbstractRunMojo
startClassName
- 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