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.
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.ClassLoader
_cl
-
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, java.lang.String mainClassName, java.lang.String classpath, java.lang.String[] jvmArgs, java.lang.String[] args)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addJvmArgs(java.lang.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/optionsprivate void
runInternal(boolean displayCmd)
Runs the main method of a java classSpawnMonitor
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(java.lang.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 java.lang.Exception
Description copied from interface:JavaMainCaller
Runs the JavaMain with all the built up arguments/options- Throws:
java.lang.Exception
-
spawn
public SpawnMonitor spawn(boolean displayCmd) throws java.lang.Exception
spawns a thread to run the method- Returns:
- the spawn Process (or null if no process was spawned)
- Throws:
java.lang.Exception
-
runInternal
private void runInternal(boolean displayCmd) throws java.lang.Exception
Runs the main method of a java class- Throws:
java.lang.Exception
-
redirectToLog
public void redirectToLog()
Description copied from interface:JavaMainCaller
request run to be redirected to maven/requester logger
-
-