类 StartMojo
- java.lang.Object
 - org.apache.maven.plugin.AbstractMojo
 - org.springframework.boot.maven.AbstractDependencyFilterMojo
 - org.springframework.boot.maven.AbstractRunMojo
 - org.springframework.boot.maven.StartMojo
 
- 所有已实现的接口:
 org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
@Mojo(name="start", requiresProject=true, defaultPhase=PRE_INTEGRATION_TEST, requiresDependencyResolution=TEST) public class StartMojo extends AbstractRunMojoStart a spring application. Contrary to therungoal, this does not block and allows other goal 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.- 从以下版本开始:
 - 1.3.0
 - 另请参阅:
 StopMojo
构造器概要
构造器 构造器 说明 StartMojo()
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 <T> Texecute(long wait, int maxAttempts, Callable<T> callback)Execute a task, retrying it on failure.protected org.springframework.boot.maven.RunArgumentsresolveApplicationArguments()Resolve the application arguments to use.protected org.springframework.boot.maven.RunArgumentsresolveJvmArguments()Resolve the JVM arguments to use.protected voidrunWithForkedJvm(File workingDirectory, List<String> args)Run with a forked VM, using the specified command line arguments.protected voidrunWithMavenJvm(String startClassName, String... arguments)Run with the current VM, using the specified arguments.从类继承的方法 org.springframework.boot.maven.AbstractRunMojo
enableForkByDefault, execute, getClassPathUrls, isFork, logDisabledFork
从类继承的方法 org.springframework.boot.maven.AbstractDependencyFilterMojo
filterDependencies, getFilters, setExcludeArtifactIds, setExcludeGroupIds, setExcludes, setIncludes
构造器详细资料
StartMojo
public StartMojo()
方法详细资料
runWithForkedJvm
protected void runWithForkedJvm(File workingDirectory, List<String> args) throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
从类复制的说明:AbstractRunMojoRun with a forked VM, using the specified command line arguments.- 指定者:
 runWithForkedJvm在类中AbstractRunMojo- 参数:
 workingDirectory- the working directory of the forked JVMargs- the arguments (JVM arguments and application arguments)- 抛出:
 org.apache.maven.plugin.MojoExecutionException- in case of MOJO execution errorsorg.apache.maven.plugin.MojoFailureException- in case of MOJO failures
resolveApplicationArguments
protected org.springframework.boot.maven.RunArguments resolveApplicationArguments()
从类复制的说明:AbstractRunMojoResolve the application arguments to use.- 覆盖:
 resolveApplicationArguments在类中AbstractRunMojo- 返回:
 - a 
RunArgumentsdefining the application arguments 
resolveJvmArguments
protected org.springframework.boot.maven.RunArguments resolveJvmArguments()
从类复制的说明:AbstractRunMojoResolve the JVM arguments to use.- 覆盖:
 resolveJvmArguments在类中AbstractRunMojo- 返回:
 - a 
RunArgumentsdefining the JVM arguments 
runWithMavenJvm
protected void runWithMavenJvm(String startClassName, String... arguments) throws org.apache.maven.plugin.MojoExecutionException
从类复制的说明:AbstractRunMojoRun with the current VM, using the specified arguments.- 指定者:
 runWithMavenJvm在类中AbstractRunMojo- 参数:
 startClassName- the class to runarguments- the class arguments- 抛出:
 org.apache.maven.plugin.MojoExecutionException- in case of MOJO execution errors
execute
public <T> T execute(long wait, int maxAttempts, Callable<T> callback) throws Exception
Execute a task, retrying it on failure.- 类型参数:
 T- the result type- 参数:
 wait- the wait timemaxAttempts- the maximum number of attemptscallback- the task to execute (possibly multiple times). The callback should returnnullto indicate that another attempt should be made- 返回:
 - the result
 - 抛出:
 Exception- in case of execution errors