ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@locus.apache.org
Subject cvs commit: jakarta-ant/docs index.html
Date Wed, 29 Nov 2000 17:15:33 GMT
bodewig     00/11/29 09:15:29

  Modified:    docs     index.html
  Log:
  Documentation for the telnet task.
  
  Submitted by:	Scott Carlson <ScottCarlson@email.com>
  
  Revision  Changes    Path
  1.157     +87 -0     jakarta-ant/docs/index.html
  
  Index: index.html
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/docs/index.html,v
  retrieving revision 1.156
  retrieving revision 1.157
  diff -u -r1.156 -r1.157
  --- index.html	2000/11/29 17:14:00	1.156
  +++ index.html	2000/11/29 17:15:21	1.157
  @@ -4574,6 +4574,7 @@
     <li><a href="#renameexts">RenameExtensions</a></li>
     <li><a href="#script">Script</a></li>
     <li><a href="#vssget">VssGet</a></li>
  +  <li><a href="#telnet">Telnet</a></li>
   </ul>
   <hr>
   <h2><a name="cab">Cab</a></h2>
  @@ -5428,6 +5429,92 @@
   <i>me</i> and the password <i>mypassword</i>. It will recursively
get the files 
   which are labeled <i>Release1</i> and write them to the local directory
   <i>C:\mysrc\myproject</i>. The local files will be writable.</p>
  +<hr>
  +
  +<h2><a name="telnet">Telnet</a></h2>
  +<h3>Description</h3>
  +Task to automate a remote telnet session. The task uses nested &lt;read&gt; to
indicate strings to wait for, and  &lt;write&gt; tags to specify text to send.  
  +
  +<p>If you do specify a userid and password, the system will assume a common unix
prompt to wait on. This behavior can be easily over-ridden.</p>
  +<h3>Parameters</h3>
  +<table border="1" cellpadding="2" cellspacing="0">
  +  <tr>
  +    <th>Attribute</th>
  +    <th>Values</th>
  +    <th>Required</th>
  +  </tr>
  +  <tr>
  +     <td>userid</td>
  +     <td>the login id to use on the telnet server.</td>
  +     <td>No</td>
  +  </tr>
  +  <tr>
  +     <td>password</td>
  +     <td>the login password to use on the telnet server.</td>
  +     <td>No</td>
  +  </tr>
  +  <tr>
  +     <td>server</td>
  +     <td>the address of the remote ftp server.</td>
  +     <td>Yes</td>
  +  </tr>
  +  <tr>
  +     <td>port</td>
  +     <td>the port number of the remote ftp server. Defaults to port 21.</td>
  +     <td>No</td>
  +  </tr>
  +  <tr>
  +     <td>initialCR</td>
  +     <td>send a cr after connecting ("yes"). Defaults to "no".</td>
  +     <td>No</td>
  +  </tr>
  +  <tr>
  +     <td>timeout</td>
  +     <td>set a default timeout to wait for a response. Specified in seconds. Default
is no timeout.</td>
  +     <td>No</td>
  +  </tr>
  +</table>
  +<h3>Examples</h3>
  +A simple example of connecting to a server and running a command.  This assumes a prompt
of "ogin:" for the userid, and a prompt of "ssword:" for the password.
  +<blockquote><pre>
  +&lt;telnet userid=&quot;bob&quot; password=&quot;badpass&quot; server=&quot;localhost&quot;&gt;
  +   &lt;read&gt;/home/bob&lt;/read&gt;
  +   &lt;write&gt;ls&lt;/read&gt;
  +   &lt;read string=&quot;/home/bob&quot;/&gt;
  +&lt;/telnet&gt;
  +</pre></blockquote>
  +
  +This task can be rewritten as:
  +<blockquote><pre>
  +&lt;telnet server=&quot;localhost&quot;&gt;
  +   &lt;read&gt;ogin:&lt;/read&gt;
  +   &lt;write&gt;bob&lt;/read&gt;
  +   &lt;read&gt;ssword:&lt;/read&gt;
  +   &lt;write&gt;badpass&lt;/read&gt;
  +   &lt;read&gt;/home/bob&lt;/read&gt;
  +   &lt;write&gt;ls&lt;/read&gt;
  +   &lt;read&gt;/home/bob&lt;/read&gt;
  +&lt;/telnet&gt;
  +</pre></blockquote>
  +
  +A timeout can be specified at the &lt;telnet&gt; level or at the &lt;read&gt;
level. This will connect, issue a sleep command that is suppressed from displaying and wait
10 seconds before quitting.
  +<blockquote><pre>
  +&lt;telnet userid=&quot;bob&quot; password=&quot;badpass&quot; server=&quot;localhost&quot;
timeout=&quot;20&quot;&gt;
  +   &lt;read&gt;/home/bob&lt;/read&gt;
  +   &lt;write echo=&quot;false&quot;&gt;sleep 15&lt;/read&gt;
  +   &lt;read timeout=&quot;10&quot;&gt;/home/bob&lt;/read&gt;
  +&lt;/telnet&gt;
  +</pre></blockquote>
  +
  +The task can be used with other ports as well:
  +<blockquote><pre>
  +&lt;telnet userid=&quot;bob&quot; password=&quot;badpass&quot; server=&quot;localhost&quot;
defaultTimeout=&quot;20&quot;&gt;
  +   &lt;read/&gt;
  +   &lt;write&gt;GET / http/0.9&lt;/read&gt;
  +   &lt;write/&gt;
  +   &lt;read timeout=&quot;10&quot;&gt;&amp;lt;/HTML&amp;gt;&lt;/read&gt;
  +&lt;/telnet&gt;
  +</pre></blockquote>
   <hr>
   <h2><a name="buildevents">Build Events</a></h2>
   Ant is capable of generating build events as it performs the tasks necessary to build a
project. 
  
  
  

Mime
View raw message