I tried to get this to work all day and can't. I want to check if my application works with my ant script. It seems that below the task should do this work, but it is not. I looked at the ant documentation with a thin tooth comb that tried various permutations, but the documentation is very scarce in terms of detecting failure with http. Can someone help. Has anyone else got http working with ant ok?
<?xml version="1.0" encoding="UTF-8"?>
<project name="hermes" default="test-app-running" xmlns:epam="epam://epam.com" xmlns:catalina="antlib://catalina.apache.org" xmlns:artifact="antlib:org.apache.maven.artifact.ant">
<target name="test-app-running" >
<waitfor maxwait="10" maxwaitunit="second">
<http url="http://localhost:8080/" />
</waitfor>
<fail message="App did not come up. Check your log files, fix and try again. Good Luck :-).">
<condition>
<http url="http://localhost:8080/" />
</condition>
</fail>
</target>
</project>
source
share