Package scala_maven_executions
Interface JavaMainCaller
- All Known Implementing Classes:
JavaMainCallerByFork
,JavaMainCallerInProcess
,JavaMainCallerSupport
public interface JavaMainCaller
This interface is used to create a call on a main method of a java class.
The important implementations are JavaCommand and ReflectionJavaCaller
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds arguments for the processvoid
Adds an environemnt variablevoid
addJvmArgs
(String... args) Adds a JVM arg.void
Adds the key if the value is truevoid
Adds an option (key-file pair).void
Adds option (basically two arguments)void
request run to be redirected to maven/requester loggervoid
run
(boolean displayCmd) boolean
run
(boolean displayCmd, boolean throwFailure) Runs the JavaMain with all the built up arguments/optionsspawn
(boolean displayCmd) run the command without stream redirection nor waiting for exit
-
Method Details
-
addEnvVar
Adds an environemnt variable -
addJvmArgs
Adds a JVM arg. Note: This is not available for in-process "forks" -
addArgs
Adds arguments for the process -
addOption
Adds option (basically two arguments) -
addOption
Adds an option (key-file pair). This will pull the absolute path of the file -
addOption
Adds the key if the value is true -
redirectToLog
void redirectToLog()request run to be redirected to maven/requester logger -
run
- Throws:
Exception
-
run
Runs the JavaMain with all the built up arguments/options- Throws:
Exception
-
spawn
run the command without stream redirection nor waiting for exit- Parameters:
displayCmd
-- Returns:
- the spawn Process (or null if no process was spawned)
- Throws:
Exception
-