Method Summary |
|
public void | addConfiguredRedirector(RedirectorElement redirectorElement) Add a RedirectorElement to this task. |
public void | addEnv(Environment.Variable var) Add an environment variable to the launched process. |
protected void | checkConfiguration() |
public Commandline.Argument | createArg() Adds a command-line argument. |
protected ExecuteStreamHandler | createHandler() Create the StreamHandler to use with our Execute instance. |
protected ExecuteWatchdog | createWatchdog() Create the Watchdog to kill a runaway process. |
public void | execute() Do the work. |
public boolean | getResolveExecutable() Indicates whether to attempt to resolve the executable to a
file. |
protected boolean | isValidOs() |
protected void | logFlush() Flush the output stream - if there is one. |
protected void | maybeSetResultPropertyValue(int result) Helper method to set result property to the
passed in value if appropriate. |
protected Execute | prepareExec() Create an Execute instance with the correct working directory set. |
protected String | resolveExecutable(String exec, boolean mustSearchPath) The method attempts to figure out where the executable is so that we can feed
the full path. |
protected void | runExec(Execute exe) Run the command using the given Execute instance. |
final protected void | runExecute(Execute exe) A Utility method for this classes and subclasses to run an
Execute instance (an external command). |
public void | setAppend(boolean append) Set whether output should be appended to or overwrite an existing file. |
public void | setCommand(Commandline cmdl) Sets a command line. |
public void | setDir(File d) Set the working directory of the process. |
public void | setError(File error) Set the File to which the error stream of the process should be redirected. |
public void | setErrorProperty(String errorProperty) Sets the name of the property whose value should be set to the error of
the process. |
public void | setExecutable(String value) Set the name of the executable program. |
public void | setFailIfExecutionFails(boolean flag) Set whether to stop the build if program cannot be started. |
public void | setFailonerror(boolean fail) Fail if the command exits with a non-zero return code. |
public void | setInput(File input) Set the input file to use for the task. |
public void | setInputString(String inputString) Set the string to use as input. |
public void | setLogError(boolean logError) Controls whether error output of exec is logged. |
public void | setNewenvironment(boolean newenv) Do not propagate old environment when new environment variables are specified. |
public void | setOs(String os) List of operating systems on which the command may be executed. |
public void | setOsFamily(String osFamily) |
public void | setOutput(File out) File the output of the process is redirected to. |
public void | setOutputproperty(String outputProp) Sets the property name whose value should be set to the output of
the process. |
public void | setResolveExecutable(boolean resolveExecutable) Set whether to attempt to resolve the executable to a file. |
public void | setResultProperty(String resultProperty) Sets the name of a property in which the return code of the
command should be stored. |
public void | setSearchPath(boolean searchPath) Set whether to search nested, then
system PATH environment variables for the executable. |
public void | setSpawn(boolean spawn) Set whether or not you want the process to be spawned. |
public void | setTimeout(Long value) Set the timeout in milliseconds after which the process will be killed. |
public void | setTimeout(Integer value) Set the timeout in milliseconds after which the process will be killed. |
public void | setVMLauncher(boolean vmLauncher) Set whether to launch new process with VM, otherwise use the OS's shell. |
protected void | setupRedirector() Set up properties on the redirector that we needed to store locally. |