Package org.springframework.boot.maven
Class RunMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.springframework.boot.maven.AbstractDependencyFilterMojo
org.springframework.boot.maven.AbstractRunMojo
org.springframework.boot.maven.RunMojo
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
@Mojo(name="run",
requiresProject=true,
defaultPhase=VALIDATE,
requiresDependencyResolution=TEST)
@Execute(phase=TEST_COMPILE)
public class RunMojo
extends AbstractRunMojo
Run an application in place.
- Since:
- 1.0.0
- Author:
- Phillip Webb, Dmytro Nosan, Stephane Nicoll, Andy Wilkinson
-
Field Summary
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidLog 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.RunArgumentsResolve the JVM arguments to use.protected voidRun 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.Methods inherited from class org.springframework.boot.maven.AbstractRunMojo
execute, getClassPathUrls, getJavaExecutable, isFork, resolveApplicationArguments, resolveEnvVariablesMethods inherited from class org.springframework.boot.maven.AbstractDependencyFilterMojo
filterDependencies, getFilters, setExcludeGroupIds, setExcludes, setIncludesMethods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
Constructor Details
-
RunMojo
public RunMojo()
-
-
Method Details
-
logDisabledFork
protected void logDisabledFork()Description copied from class:AbstractRunMojoLog a warning indicating that fork mode has been explicitly disabled while some conditions are present that require to enable it.- Overrides:
logDisabledForkin classAbstractRunMojo
-
resolveJvmArguments
protected org.springframework.boot.maven.RunArguments resolveJvmArguments()Description copied from class:AbstractRunMojoResolve the JVM arguments to use.- Overrides:
resolveJvmArgumentsin classAbstractRunMojo- Returns:
- a
RunArgumentsdefining the JVM arguments
-
runWithForkedJvm
protected void runWithForkedJvm(File workingDirectory, List<String> args, Map<String, String> environmentVariables) throws org.apache.maven.plugin.MojoExecutionExceptionDescription copied from class:AbstractRunMojoRun with a forked VM, using the specified command line arguments.- Specified by:
runWithForkedJvmin classAbstractRunMojo- Parameters:
workingDirectory- the working directory of the forked JVMargs- the arguments (JVM arguments and application arguments)environmentVariables- the environment variables- Throws:
org.apache.maven.plugin.MojoExecutionException- in case of MOJO execution errors
-
runWithMavenJvm
protected void runWithMavenJvm(String startClassName, String... arguments) throws org.apache.maven.plugin.MojoExecutionException Description copied from class:AbstractRunMojoRun with the current VM, using the specified arguments.- Specified by:
runWithMavenJvmin classAbstractRunMojo- Parameters:
startClassName- the class to runarguments- the class arguments- Throws:
org.apache.maven.plugin.MojoExecutionException- in case of MOJO execution errors
-