ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "CONANT,PATRICK (HP-FtCollins,ex1)" <>
Subject RE: Telnet Task Issue
Date Thu, 29 Jan 2004 23:17:38 GMT
You might try reading something back to prevent the telnet connection from
being closed before the commands are received by the remote system.  Try
replacing your "<read/>" elements with "<read>blahblahblah</read>" where
"blahblahblah" is what you expect to be sent from the telnet server to the
client after each command is executed (e.g. a command prompt or the output
of the previous command).


-----Original Message-----
From: Conelly, Luis (PS, GNF, Contractor) [] 
Sent: Thursday, January 29, 2004 3:56 PM
Subject: Telnet Task Issue

Hi all,

    I am having an issue with <telnet> task. I am trying to execute a simple
script via ant to a *nix server [Red Hat Linux release 7.2 (Enigma)] 

    This is the snippet of the script:

    <target name="callScript">
  	<telnet userid="${}" password="${}"
         <write echo="true"> sh /scripts/ </write>
         <write echo="true">exit</write>

    And the output looks like:

Buildfile: telnet_tools.xml

   [telnet] Red Hat Linux release 7.2 (Enigma)
   [telnet] Kernel 2.4.7-10 on an i686
   [telnet] login:
   [telnet] xxxxxx
   [telnet]  Password:

   [telnet]  sh /scripts/

   [telnet] exit

Total time: 1 second

	However, the script does not get executed. I have tried to execute
simpler [such as ls], but it doesn't get a thing. Does anybody has an idea
about why is this happening?


	Workstation OS: Win2K Pro
	Ant: 1.6beta2
	JDK: 1.4.1_02
	Server OS: Red Hat Linux release 7.2 (Enigma)

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message