Package io.joshworks.snappy.maven
Class AbstractRunMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- io.joshworks.snappy.maven.AbstractDependencyFilterMojo
-
- io.joshworks.snappy.maven.AbstractRunMojo
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
public abstract class AbstractRunMojo extends AbstractDependencyFilterMojo
Base class to run a spring application.
-
-
Constructor Summary
Constructors Constructor Description AbstractRunMojo()
-
Method Summary
Modifier and Type Method Description voidexecute()protected java.net.URL[]getClassPathUrls()protected booleanisFork()Specify if the application process should be forked.protected io.joshworks.snappy.maven.RunArgumentsresolveApplicationArguments()Resolve the application arguments to use.protected io.joshworks.snappy.maven.RunArgumentsresolveJvmArguments()Resolve the JVM arguments to use.protected abstract voidrunWithForkedJvm(java.util.List<java.lang.String> args)Run with a forked VM, using the specified command line arguments.protected abstract voidrunWithMavenJvm(java.lang.String startClassName, java.lang.String... arguments)Run with the current VM, using the specified arguments.-
Methods inherited from class io.joshworks.snappy.maven.AbstractDependencyFilterMojo
filterDependencies, getFilters, setExcludeArtifactIds, setExcludeGroupIds, setExcludes, setIncludes
-
-
-
-
Method Detail
-
isFork
protected boolean isFork()
Specify if the application process should be forked.- Returns:
trueif the application process should be forked
-
execute
public void execute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException- Throws:
org.apache.maven.plugin.MojoExecutionExceptionorg.apache.maven.plugin.MojoFailureException
-
runWithForkedJvm
protected abstract void runWithForkedJvm(java.util.List<java.lang.String> args) throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureExceptionRun with a forked VM, using the specified command line arguments.- Parameters:
args- the arguments (JVM arguments and application arguments)- Throws:
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(java.lang.String startClassName, java.lang.String... arguments) throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureExceptionRun with the current VM, using the specified arguments.- Parameters:
startClassName- the class to runarguments- the class arguments- Throws:
org.apache.maven.plugin.MojoExecutionException- in case of MOJO execution errorsorg.apache.maven.plugin.MojoFailureException- in case of MOJO failures
-
resolveApplicationArguments
protected io.joshworks.snappy.maven.RunArguments resolveApplicationArguments()
Resolve the application arguments to use.- Returns:
- a
RunArgumentsdefining the application arguments
-
resolveJvmArguments
protected io.joshworks.snappy.maven.RunArguments resolveJvmArguments()
Resolve the JVM arguments to use.- Returns:
- a
RunArgumentsdefining the JVM arguments
-
getClassPathUrls
protected java.net.URL[] getClassPathUrls() throws org.apache.maven.plugin.MojoExecutionException- Throws:
org.apache.maven.plugin.MojoExecutionException
-
-