org.apache.tools.ant.taskdefs
Class Exec
- Cloneable
Executes a given command if the os platform is appropriate.
As of Ant 1.2, this class is no longer the
implementation of Ant's <exec> task - it is considered to be
dead code by the Ant developers and is unmaintained. Don't use
it.
Exec() - Constructor for Exec.
|
void | execute() - Execute the task.
|
protected void | logFlush() - Close output.
|
protected void | outputLog(String line, int messageLevel) - Log an output message.
|
protected int | run(String command) - Execute the command.
|
void | setCommand(String command) - Set the command to exec.
|
void | setDir(String d) - Set the directory.
|
void | setFailonerror(boolean fail) - Set the failOnError attribute.
|
void | setOs(String os) - Set the Operating System that this exec is to run in.
|
void | setOutput(String out) - Set the output filename.
|
bindToOwner , execute , getOwningTarget , getRuntimeConfigurableWrapper , getTaskName , getTaskType , getWrapper , handleErrorFlush , handleErrorOutput , handleFlush , handleInput , handleOutput , init , isInvalid , log , log , log , log , maybeConfigure , perform , reconfigure , setOwningTarget , setRuntimeConfigurableWrapper , setTaskName , setTaskType |
fos
protected PrintWriter fos
Exec
public Exec()
Constructor for Exec.
Prints a warning message to std error.
logFlush
protected void logFlush()
Close output.
outputLog
protected void outputLog(String line,
int messageLevel)
Log an output message.
line
- the line to putputmessageLevel
- the level of logging - ignored
if output is going to a file
run
protected int run(String command)
throws BuildException
Execute the command.
command
- the command to exec
- the exit value of the command
setCommand
public void setCommand(String command)
Set the command to exec.
setDir
public void setDir(String d)
Set the directory.
setFailonerror
public void setFailonerror(boolean fail)
Set the failOnError attribute.
Default is false.
setOs
public void setOs(String os)
Set the Operating System that this exec is to run in.
setOutput
public void setOutput(String out)
Set the output filename.