ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From neogeo <>
Subject ant checking result status
Date Wed, 12 Mar 2008 00:23:31 GMT

Hi all,

I am an ANT newbie and have a few questions.  I have the following task
which works but wondering if I could check the result status from the http

<target name="is_jboss_running" depends="">
		<description>Checks if the JBoss Server is running.</description>
		<echo>Testing if the JBoss Server is running on ${jboss.url}</echo>
		 <condition property="is_jboss_running" else="false">
		 	<http url="${jboss.url}"/>
		 <echo message="Is JBoss running? ... [ ${is_jboss_running} ]"/> 

This outputs... 
[echo] Testing if the JBoss Server is running on http://localhost:8080
Checking for http://localhost:8080
Result code for http://localhost:8080 was 200
[echo] Is JBoss running? ... [ true ] 

Which is fine, but I am wondering if its possible to grep or run a reg ex on
the return string "Result code for http://localhost:8080 was 200" and test
for http status codes ie 200.

I have seen this from anteater which will do
exactly what I am asking but I would like to explore the core ant features
features before resulting to add an external tool.

Has anyone got any suggestions?

View this message in context:
Sent from the Ant - Users mailing list archive at

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

View raw message