public abstract class AbstractRunMojo extends AbstractDependencyFilterMojo
Constructor and Description |
---|
AbstractRunMojo() |
Modifier and Type | Method and Description |
---|---|
void |
execute() |
protected java.net.URL[] |
getClassPathUrls() |
protected java.lang.String |
getJavaExecutable()
Provides access to the java binary executable, regardless of OS.
|
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.EnvVariables |
resolveEnvVariables()
Resolve the environment variables to use.
|
protected org.springframework.boot.maven.RunArguments |
resolveJvmArguments()
Resolve the JVM arguments to use.
|
protected abstract 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 abstract void |
runWithMavenJvm(java.lang.String startClassName,
java.lang.String... arguments)
Run with the current VM, using the specified arguments.
|
filterDependencies, getFilters, setExcludeGroupIds, setExcludes, setIncludes
public void execute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException
protected boolean isFork()
true
if the application process should be forkedprotected void logDisabledFork()
protected abstract 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
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 abstract void runWithMavenJvm(java.lang.String startClassName, java.lang.String... arguments) throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
startClassName
- the class to runarguments
- the class argumentsorg.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()
RunArguments
defining the application argumentsprotected java.lang.String getJavaExecutable()
protected org.springframework.boot.maven.EnvVariables resolveEnvVariables()
EnvVariables
defining the environment variablesprotected org.springframework.boot.maven.RunArguments resolveJvmArguments()
RunArguments
defining the JVM argumentsprotected java.net.URL[] getClassPathUrls() throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException