Package scala_maven_executions
Class JavaMainCallerInProcess
- java.lang.Object
-
- scala_maven_executions.JavaMainCallerSupport
-
- scala_maven_executions.JavaMainCallerInProcess
-
- All Implemented Interfaces:
JavaMainCaller
public class JavaMainCallerInProcess extends JavaMainCallerSupport
This class will call a java main method via reflection.- Author:
- J. Suereth Note: a -classpath argument *must* be passed into the jvmargs.
-
-
Field Summary
-
Fields inherited from class scala_maven_executions.JavaMainCallerSupport
args, env, jvmArgs, mainClassName, requester
-
-
Constructor Summary
Constructors Constructor Description JavaMainCallerInProcess(org.apache.maven.plugin.AbstractMojo requester, String mainClassName, String classpath, String[] jvmArgs, String[] args)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addJvmArgs(String... args0)
Adds a JVM arg.void
redirectToLog()
request run to be redirected to maven/requester loggerboolean
run(boolean displayCmd, boolean throwFailure)
Runs the JavaMain with all the built up arguments/optionsSpawnMonitor
spawn(boolean displayCmd)
spawns a thread to run the method-
Methods inherited from class scala_maven_executions.JavaMainCallerSupport
addArgs, addEnvVar, addOption, addOption, addOption, addToClasspath, run
-
-
-
-
Method Detail
-
addJvmArgs
public void addJvmArgs(String... args0)
Description copied from interface:JavaMainCaller
Adds a JVM arg. Note: This is not available for in-process "forks"- Specified by:
addJvmArgs
in interfaceJavaMainCaller
- Overrides:
addJvmArgs
in classJavaMainCallerSupport
-
run
public boolean run(boolean displayCmd, boolean throwFailure) throws Exception
Description copied from interface:JavaMainCaller
Runs the JavaMain with all the built up arguments/options- Throws:
Exception
-
spawn
public SpawnMonitor spawn(boolean displayCmd) throws Exception
spawns a thread to run the method- Returns:
- the spawn Process (or null if no process was spawned)
- Throws:
Exception
-
redirectToLog
public void redirectToLog()
Description copied from interface:JavaMainCaller
request run to be redirected to maven/requester logger
-
-