Apache Ant TasksRExecRExecDescriptionTask to automate a remote rexec session. Just like the Telnet task,it uses nested <read> to indicate strings to wait for, and<write> tags to specify text to send to the remote process.Note: This task depends on external libraries not included in the Apache Ant distribution.See Library Dependencies for more information. You can specify the commands you want to execute as nested elementsor via the command attribute, we recommend you use the commandattribute. If you use the command attribute, you must use theusername and password attributes as well. Parameters Attribute | Values | Required | userid | the login id to use on the remote server. | No | password | the login password to use on the remote server. | No | server | the address of the remote rexec server. | Yes | command | the command to execute on the remote server. | No | port | the port number of the remote rexec server. Defaults to port 512 in BSD Unix systems. | No | timeout | set a default timeout to wait for a response. Specified in seconds. Default is no timeout. | No | Nested ElementsThe input to send to the server, and responses to wait for, aredescribed as nested elements. readdeclare (as a text child of this element) a string to wait for.The element supports the timeout attribute, which overrides anytimeout specified for the task as a whole. It also has a stringattribute, which is an alternative to specifying the string as a text element. It is not necessary to declare a closing <read> element like for the Telnet task. The connection is not broken until the command has completed andthe input stream (output of the command) is terminated.writedescribes the text to send to the server. The echo booleanattribute controls whether the string is echoed to the local log; this is "true" by default ExampleA simple example of connecting to a server and running a command.<rexec userid="bob" password="badpass" server="localhost" command="ls"/> The task can be used with other ports as well:<rexec port="80" userid="bob" password="badpass" server="localhost" command="ls"/> |