org.apache.tools.ant.taskdefs.optional.ssh
public class SSHExec extends SSHBase
Since: Ant 1.6 (created February 2, 2003)
Constructor Summary | |
---|---|
SSHExec()
Constructor for SSHExecTask. |
Method Summary | |
---|---|
void | execute()
Execute the command on the remote host.
|
void | setAppend(boolean append)
Determines if the output is appended to the file given in
setOutput . |
void | setCommand(String command)
Sets the command to execute on the remote host.
|
void | setOutput(File output)
If used, stores the output of the command to the given file.
|
void | setOutputproperty(String property)
If set, the output of the command will be stored in the given property.
|
void | setTimeout(long timeout)
The connection can be dropped after a specified number of
milliseconds. |
Throws: BuildException Most likely a network error or bad parameter.
setOutput
. Default is false, that is, overwrite
the file.
Parameters: append True to append to an existing file, false to overwrite.
Parameters: command The new command value
Parameters: output The file to write to.
Parameters: property The name of the property in which the command output will be stored.
Parameters: timeout The new timeout value in seconds