|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.scala_tools.maven.JavaCommand
public class JavaCommand
Helper class use to call a java Main in an external process.
Constructor Summary | |
---|---|
JavaCommand(org.apache.maven.plugin.AbstractMojo requester,
String mainClassName,
String classpath,
String[] jvmArgs,
String[] args)
|
Method Summary | |
---|---|
void |
addArgs(String... args)
Adds arguments for the process |
void |
addEnvVar(String key,
String value)
Adds an environemnt variable |
void |
addJvmArgs(String... args)
Adds a JVM arg. |
void |
addOption(String key,
boolean value)
Adds the key iff the value is true |
void |
addOption(String key,
File value)
Adds an option (key-file pair). |
void |
addOption(String key,
String value)
Adds option (basically two arguments) |
static String[] |
findFiles(File dir,
String pattern)
|
void |
run(boolean displayCmd)
|
void |
run(boolean displayCmd,
boolean throwFailure)
Runs the JavaMain with all the built up arguments/options |
void |
setLogOnly(boolean v)
Sets the process to *only* log errors |
void |
spawn(boolean displayCmd)
run the command without stream redirection nor waiting for exit |
static String |
toClasspathString(ClassLoader cl)
|
static String |
toMultiPath(List<String> paths)
|
static String |
toMultiPath(String[] paths)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JavaCommand(org.apache.maven.plugin.AbstractMojo requester, String mainClassName, String classpath, String[] jvmArgs, String[] args) throws Exception
Exception
Method Detail |
---|
public static String toMultiPath(List<String> paths)
public static String toMultiPath(String[] paths)
public static String[] findFiles(File dir, String pattern)
public static String toClasspathString(ClassLoader cl) throws Exception
Exception
public void addEnvVar(String key, String value)
JavaMainCaller
addEnvVar
in interface JavaMainCaller
public void addJvmArgs(String... args)
JavaMainCaller
addJvmArgs
in interface JavaMainCaller
public void addArgs(String... args)
JavaMainCaller
addArgs
in interface JavaMainCaller
public void addOption(String key, String value)
JavaMainCaller
addOption
in interface JavaMainCaller
public void addOption(String key, File value)
JavaMainCaller
addOption
in interface JavaMainCaller
public void addOption(String key, boolean value)
JavaMainCaller
addOption
in interface JavaMainCaller
public void setLogOnly(boolean v)
JavaMainCaller
setLogOnly
in interface JavaMainCaller
public void run(boolean displayCmd) throws Exception
run
in interface JavaMainCaller
Exception
public void run(boolean displayCmd, boolean throwFailure) throws Exception
JavaMainCaller
run
in interface JavaMainCaller
Exception
public void spawn(boolean displayCmd) throws Exception
JavaMainCaller
spawn
in interface JavaMainCaller
Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |