ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Loughran" <stev...@iseran.com>
Subject Re: can telnet task make build fail in specified conditions
Date Fri, 05 Apr 2002 18:01:37 GMT

----- Original Message -----
From: "stephan beal" <stephan@wanderinghorse.net>
To: "Ant Users List" <ant-user@jakarta.apache.org>; "Emmanuel Sciara"
<antsciara@yahoo.com>
Sent: Friday, April 05, 2002 8:55 AM
Subject: Re: can telnet task make build fail in specified conditions


> 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>:


you dont need to alter telnet

1. you can have it wait (with a timeout) to read some success message; the
build fails on timeout when the text you want aint read, everything
propagates.

2. you can use <waitfor> to spin waiting for a remote URL to be visible;
that is the best test for your app server running...




--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message