ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Diane Holt <>
Subject Re: Print message if property unset (or if file doesn't exist)?
Date Mon, 16 Sep 2002 23:09:27 GMT
--- "Karr, David" <> wrote:
> I just want to print a message if a "" file does not
> exist in a directory.  I would think this would be an easy thing to do,
> but I don't see a way to do it.  I figured out how to set a property if
> a file is present, but I don't see how to do anything with that.

Do you want it to print the message and keep going, or print the message
and fail?

If the latter, just 'unless' on it in a <fail> task (as of 1.5). If the
former, you'll need to wrap an <echo> in a <target> and 'unless' on the
<target> -- or use the ant-contrib <if> task. (I modified <echo> to allow
for if/unless, but I've not submitted it -- and I think I remember someone
[DD?] putting through something that allowed if/unless on any task, so
that'd probably be the better way to go anyway -- assuming I didn't just
dream it?... ack, been away from all this too long... too much real work,
too little time.)



Do you Yahoo!?
Yahoo! News - Today's headlines

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

View raw message