I'm using Ant 1.5 to develop and test web apps with Tomcat 5. I need a way to use an Ant task to determine whether a particular web app is installed.

Currently, my init task uses <available> to check the existence of a marker file. Then the build task tests the property set by <available>. If the marker file doesn't exist, the build task creates the marker file and installs the app. If the marker file exists, the build task reloads the app.

However, this simple scheme frequently fails because there are times when the marker file exists but the application failed to install. I need a way to make the test for a successful installation more reliable.

I thought about doing away with the marker file and instead using a Perl script that runs "ant list", searchs for the app context name in Ant's output, and sets a return code. But how do I test the return code in build.xml? The exec task supports a resultproperty attribute but I don't see a way to test the property's value.

Note: I need to use Ant 1.5 bundled with JWSDP, so Ant 1.6 features won't help.

Thanks,
Mike

--

Mike Woinoski                      Pine Needle Consulting
mailto:[EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to