类 AbstractRunMojo
- java.lang.Object
- org.apache.maven.plugin.AbstractMojo
- org.springframework.boot.maven.AbstractDependencyFilterMojo
- org.springframework.boot.maven.AbstractRunMojo
- 所有已实现的接口:
org.apache.maven.plugin.ContextEnabled
,org.apache.maven.plugin.Mojo
public abstract class AbstractRunMojo extends AbstractDependencyFilterMojo
Base class to run a spring application.
构造器概要
构造器 构造器 说明 AbstractRunMojo()
方法概要
所有方法 实例方法 抽象方法 具体方法 修饰符和类型 方法 说明 protected boolean
enableForkByDefault()
Specify if fork should be enabled by default.void
execute()
protected URL[]
getClassPathUrls()
protected boolean
isFork()
Specify if the application process should be forked.protected void
logDisabledFork()
Log a warning indicating that fork mode has been explicitly disabled while some conditions are present that require to enable it.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 abstract void
runWithForkedJvm(File workingDirectory, List<String> args)
Run with a forked VM, using the specified command line arguments.protected abstract void
runWithMavenJvm(String startClassName, String... arguments)
Run with the current VM, using the specified arguments.从类继承的方法 org.springframework.boot.maven.AbstractDependencyFilterMojo
filterDependencies, getFilters, setExcludeArtifactIds, setExcludeGroupIds, setExcludes, setIncludes
构造器详细资料
AbstractRunMojo
public AbstractRunMojo()
方法详细资料
execute
public void execute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
- 抛出:
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException
isFork
protected boolean isFork()
Specify if the application process should be forked.- 返回:
true
if the application process should be forked
enableForkByDefault
protected boolean enableForkByDefault()
Specify if fork should be enabled by default.- 返回:
true
if fork should be enabled by default- 另请参阅:
logDisabledFork()
logDisabledFork
protected void logDisabledFork()
Log a warning indicating that fork mode has been explicitly disabled while some conditions are present that require to enable it.
runWithForkedJvm
protected abstract void runWithForkedJvm(File workingDirectory, List<String> args) throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
Run with a forked VM, using the specified command line arguments.- 参数:
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
runWithMavenJvm
protected abstract void runWithMavenJvm(String startClassName, String... arguments) throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
Run with the current VM, using the specified arguments.- 参数:
startClassName
- the class to runarguments
- the class 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()
Resolve the application arguments to use.- 返回:
- a
RunArguments
defining the application arguments
resolveJvmArguments
protected org.springframework.boot.maven.RunArguments resolveJvmArguments()
Resolve the JVM arguments to use.- 返回:
- a
RunArguments
defining the JVM arguments
getClassPathUrls
protected URL[] getClassPathUrls() throws org.apache.maven.plugin.MojoExecutionException
- 抛出:
org.apache.maven.plugin.MojoExecutionException