ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Diane Holt <>
Subject Re: Delete did not fail
Date Wed, 17 Apr 2002 18:03:03 GMT
--- "Truesdale, Jay" <> wrote:
> I have this in build.xml:
> <delete failonerror="true" quiet="false" verbose="true"
> logic_port}/conf/" />
> If one of the properties (say ${release_version}) is not defined then I
> would expect the delete task to fail since the file does not exist. It
> doesn't and the Ant build continues along its merry way.
> Am I missing something?

The <delete> task doesn't consider not finding the specified file an error
-- afterall, if you're deleting a file that doesn't exist, it's a push :) 
The only time an error comes into it is if the process of actually
deleting a file that does exist fails.

What you probably want to do, if verifying that your required properties
are set is your actual goal here, is to have a <condition> block that does
just that, with a <fail> if any required ones aren't set. In 1.5alpha
(soon to go beta), there's an <isset> condition -- for 1.4(.1), you'd need
to use the <equals> condition, testing for, eg., "$${release.version}".



Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax

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

View raw message