ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Dillon <ja...@planet57.com>
Subject Re: [NEW TASK] require
Date Tue, 19 Sep 2000 18:56:04 GMT
How would you use if/unless attribute to merge this into one?

I think that require is a little cleaner than this... though I have to
admit that I did not know there was a fail task until now.

I would really like to make require more like property, so it could reside
outside of a target, but I am not sure how to do that.

--jason

On 19 Sep 2000, Stefan Bodewig wrote:

> >>>>> "JD" == Jason Dillon <jason@boldfish.com> writes:
> 
>  JD> Hello, here is a new task which is a lot like available, except
>  JD> that it will throw an exception if the given resource is not
>  JD> available.
> 
> I don't actually like the duplication here.
> 
> <target name="check">
>   <available property="all.there" ... >
> </target>
> 
> <target name="check.and.fail" depends="check" unless="all.there">
>   <fail message="Resource XYZ is missing" />
> </target>
> 
> <target name="main" depends="check.and.fail">
> ...
> 
> would do the same.
> 
> we could add if/unless attribute to fail to merge these targets into a
> single one though.
> 
> Stefan
> 


Mime
View raw message