ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stephan beal <>
Subject Re: can telnet task make build fail in specified conditions
Date Fri, 05 Apr 2002 16:55:27 GMT
On Friday 05 April 2002 18:05 pm, Emmanuel Sciara wrote:
> Hi all,
> I am using the telnet task to start and stop my remote weblogic server. I
> would like to make my build fail if the server does not start up.
> Looking at the doc, the telnet task does not have any feature to do that.

It's not a limit of the task, but of telnet - it only passes text back and 
forth, not program return values.

> Right? If yes is there a work around? or do I need to write my own telnet
> task?

if i may venture a guess, you could edit/subclass the telnet class and fudge 
the way it handles <read>, and check that text for some specific failure 
text, then throw a build exception if you find it. Not pretty, but it could 
very be done generically with some additions to <telnet>:

<telnet failonread="error starting Weblogic!">

Then have telnet (or <read>) look for that text on new input.
Even better would probably be:

  <read failonread="error starting Weblogic!">....</read>

----- stephan
Generic Unix Computer Guy -
Office: +49 (89)  552 92 862 Handy:  +49 (179) 211 97 67
"Wenn ich weniger Bock haette, wuerde ich nicht Atmen."

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

View raw message