ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Loughran" <>
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" <>
To: "Ant Users List" <>; "Emmanuel Sciara"
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.
> > 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
> 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
> > task?
> if i may venture a guess, you could edit/subclass the telnet class and
> 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
> 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

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:   <>
For additional commands, e-mail: <>

View raw message