ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Diane Holt <hol...@yahoo.com>
Subject Re: Delete did not fail
Date Wed, 17 Apr 2002 18:03:03 GMT
--- "Truesdale, Jay" <JTruesdale@erac.com> wrote:
> I have this in build.xml:
> 
> <delete failonerror="true" quiet="false" verbose="true"
>
file="${root_dir}/${release_version}/wlconf.${prod_mach_1}/cluster${nosi_web
> logic_port}/conf/DB2DataSync.properties" />
> 
> 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}".

Diane

=====
(holtdl@yahoo.com)



__________________________________________________
Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax
http://taxes.yahoo.com/

--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message