Hello Peter and Igor, Here is a code the makes a slightly different task - it checks whether a war file has been deployed correctly using <waitfor> task [1] and <http> [2] condition:
<property name="install.context" value="mywebapp"/> <property name="install.port" value="8080"/> <property name="install.httpurl" value="http://localhost:${install.port}/${install.context}/index.jsp"/> <target name="deploy" depends="initdb" description="Deploys arcade's war"> <copy file="${basedir}/${branch}${project.name}.war" tofile="${catalina.home}/webapps/${project.name}.war"/> <waitfor timeoutproperty="time.out.property"> <http url="${install.httpurl}"/> </waitfor> <fail if="time.out.property" message="Deployment failed. Check whether Tomcat Service is started and if not start it."/> <echo message="Deployment finished. Arcade application is ready to be accessed"/> </target> Besides <http> condition you can use also <socket> that probes for a listening application on a given port. HTH Ivan [1]http://ant.apache.org/manual/CoreTasks/waitfor.html [2]http://ant.apache.org/manual/CoreTasks/conditions.html --- "Igor A. Deruga" <[EMAIL PROTECTED]> wrote: > Hello, Peter! > > As far as I remember, I used to stop Tomcat before > building project and start > it after the build. If it isn't currently running, > the stop task would fail, > but nothing bad would happen. So you just try to > stop it and then - start it. > > I don't think that it's a good idea to look at "ps > -A" output ;) > > Sincerely > Igor > > On Monday 15 November 2004 21:38, Peter Neu wrote: > > Thanks. This solved the problem. > > > > One last thing: How can I test if Tomcat is still > runnig in order to invoke > > first the shutdown.bat before I proceed ? > > --------------------------------------------------------------------- > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > __________________________________ Do you Yahoo!? The all-new My Yahoo! - Get yours free! http://my.yahoo.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]