handleFlush(String output) Pass output sent to System.out to specified output file.
public int
handleInput(byte[] buffer, int offset, int length) Handle an input request by this task.
Parameters: buffer - the buffer into which data is to be read. Parameters: offset - the offset into the buffer at which data is stored. Parameters: length - the amount of data to read.
protected void
handleOutput(String output) Pass output sent to System.out to specified output file.
protected void
maybeSetResultPropertyValue(int result) Helper method to set result property to the
passed in value if appropriate.
protected void
run(String classname, Vector args) Executes the given classname with the given arguments as if it
were a command line application.
public void
setAppend(boolean append) If true, append output to existing file.
public void
setArgs(String s) Deprecated: use nested arg instead.
setCloneVm(boolean cloneVm) If set, system properties will be copied to the cloned VM--as
well as the bootclasspath unless you have explicitly specified
a bootclaspath.
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 is redirected.
public void
setErrorProperty(String errorProperty) Set the property name whose value should be set to the error of
the process.
public void
setFailonerror(boolean fail) If true, then fail if the command exits with a
returncode other than zero.
Do the execution and return a return code.
the return code from the execute java class if it wasexecuted in a separate VM (fork = "yes") or a security manager wasinstalled that prohibits ExitVM (default). throws: BuildException - if required parameters are missing.
Pass output sent to System.out to specified output file.
Parameters: output - string of output on its way to its handlers. since: Ant 1.5.2
handleInput
public int handleInput(byte[] buffer, int offset, int length) throws IOException(Code)
Handle an input request by this task.
Parameters: buffer - the buffer into which data is to be read. Parameters: offset - the offset into the buffer at which data is stored. Parameters: length - the amount of data to read. the number of bytes read. exception: IOException - if the data cannot be read. since: Ant 1.6
Executes the given classname with the given arguments as if it
were a command line application.
Parameters: classname - the name of the class to run. Parameters: args - arguments for the class. throws: BuildException - in case of IOException in the execution.
If true, then fail if the command exits with a
returncode other than zero.
Parameters: fail - if true fail the build when the command exits with anonzero returncode.
Set the location of the JAR file to execute.
Parameters: jarfile - the jarfile to execute. throws: BuildException - if there is also a main class specified.
Set whether error output of exec is logged. This is only useful
when output is being redirected and error output is desired in the
Ant log.
Parameters: logError - get in the ant log the messages coming from stderrin the case that fork = true.
Set the File to which the output of the process is redirected.
Parameters: out - the output File.
setOutputproperty
public void setOutputproperty(String outputProp)(Code)
Set the property name whose value should be set to the output of
the process.
Parameters: outputProp - property name.
setResultProperty
public void setResultProperty(String resultProperty)(Code)
Set the name of the property in which the return code of the
command should be stored. Only of interest if failonerror=false.
Parameters: resultProperty - name of property. since: Ant 1.6
Set whether or not you want the process to be spawned;
default is not spawned.
Parameters: spawn - if true you do not want Ant to wait for the end of the process. since: Ant 1.6