ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ivan Ivanov <>
Subject Re: using waitfor to verify a server was shutdown
Date Tue, 10 May 2005 14:20:49 GMT
Hello Mark,

I think socket condition might help you:

  <condition property="server.down">
      <socket server="localhost" port="${port}"/>
  <echo>$${server.down} is ${server.down}</echo>

Here is the output of two checks against bound and
unbound ports:
$ ant -f ports.xml -Dport=123
Buildfile: ports.xml
     [echo] ${server.down} is true
i.e. there is no one listening in this port

$ ant -f ports.xml -Dport=22
Buildfile: ports.xml
     [echo] ${server.down} is ${server.down}
i.e. port is busy.

HTH Ivan

--- Mark Lybarger <> wrote:
> is there an example for using the waitfor task (or
> is there something else i 
> should use?) to wait till a server has
> shutdown/stopped listening to a 
> particular port?
> thanks!

Yahoo! Mail
Stay connected, organized, and protected. Take the tour:

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

View raw message