ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Kolmodin <Michael.Kolmo...@frontec.se>
Subject Re: [NEW TASK] require
Date Tue, 19 Sep 2000 21:11:52 GMT
Whichever way we do it (<require> or generalised <available> ) it might be
fruitful to generalise the concept also to fileSets. It's quite common to
require that i. e. a number of files are in place before an installation. If
the task which checks
this can handle filesets, this set of files can be declared in one place.
Otherwise
there is an obvious risk that is is scattered in a lot of statements. Not
nice.

Of course, there might other ways to come to the same result. I just feel that
if
an installation is depending on a set of files, resources etc. one should be
able
to define this set in one, single place.

Or maybe <available> already can handle filesets? But then, we need a
doc update.

I'm doing this on my spare time, so I'm not always to clever at this time of
the
day. My last bright idea was the merging ;-) Is this better ?

-michael

Jason Dillon wrote:

> 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