org_scala_tools_maven_executions
Class JavaMainCallerInProcess
java.lang.Object
org_scala_tools_maven_executions.JavaMainCallerSupport
org_scala_tools_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.
Method Summary |
void |
addJvmArgs(String... args)
Adds a JVM arg. |
void |
redirectToLog()
request run to be redirected to maven/requester logger |
boolean |
run(boolean displayCmd,
boolean throwFailure)
Runs the JavaMain with all the built up arguments/options |
SpawnMonitor |
spawn(boolean displayCmd)
spawns a thread to run the method |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JavaMainCallerInProcess
public JavaMainCallerInProcess(org.apache.maven.plugin.AbstractMojo requester,
String mainClassName,
String classpath,
String[] jvmArgs,
String[] args)
throws Exception
- Throws:
Exception
addJvmArgs
public void addJvmArgs(String... args)
- Description copied from interface:
JavaMainCaller
- Adds a JVM arg. Note: This is not available for in-process "forks"
- Specified by:
addJvmArgs
in interface JavaMainCaller
- Overrides:
addJvmArgs
in class JavaMainCallerSupport
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
Copyright © 2010-2011 Scala Tools. All Rights Reserved.