ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Roman Sokolyuk <>
Subject Testing if Tomcat is running
Date Fri, 29 May 2009 02:31:22 GMT
Ant: 1.7.1
OS: Mac OS X Leopard
Java: 1.5.0_16
Tomcat: 6

I am using the following ant tasks to stop my Tomcat:

<target name="stop-tomcat">

<exec os="Mac OS X" executable="/bin/sh">

<arg line="${tomcat}/bin/" />


<sleep seconds="5" />


but when it is executed and Tomcat is already down it obviously throws an

Could anyone suggest how I could test whether Tomcat is running, and execute
this task only when it is?


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message