ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Conor MacNeill" <co...@cortexebusiness.com.au>
Subject RE: if and unless attributes for all Tasks
Date Wed, 16 May 2001 03:12:11 GMT
My 2 cents worth.

I see that conditional processing is a necessary part of the build process.
People who don't want to see conditional processing of at least the form we
currently have in Ant-1, should, I believe, look at all the build files here
(http://jakarta.apache.org/builds/gump/latest/) and propose how to address
their conditional processing needs. You could start with Ant's own build
file.

IIRC, Duncan was not happy with if and unless attribute at the target level
but did accept them on
at least one task, the antcall (or call-target) task
http://marc.theaimsgroup.com/?l=ant-dev&m=97847384004229&w=2
The whole antcall approach with conditionals, however, seems to me to be
just as much a layering of conditional logic on top of the target dependency
model. If anything it seems more complex since I can't see dependencies just
by looking at the targets - I have to look at the use of antcall within ALL
the targets. The build structure is no longer immediately evident from the
targets. This is already a problem with Ant's own build file, IMHO.

Jon, I too am all for something better and I am interested in what you think
would be better. What would a build file look like that didn't suffer from
the "overly complex" <uptodate> usage.

Jesse, you've raised this issue so I am interested in how you see the
current Ant build file should be written. How would you eliminate the if and
unless attributes? Would the result be simpler to understand?

Is writing tasks the right way? I'm not sure that is true.

Conor



> -----Original Message-----
> From: Jon Stevens [mailto:jon@latchkey.com]
> Sent: Wednesday, 16 May 2001 9:16 AM
> To: ant-dev@jakarta.apache.org
> Subject: Re: if and unless attributes for all Tasks
>
>
> This discussion cracks me up!
>
>     @see <http://jakarta.apache.org/struts/struts-logic.html>
>
> Personally, I'm all for something better than the current <uptodate>
> checking methodology because frankly it just plain sucks.
>
> As an example, here is a build.xml file that is overly complex as a result
> of this <uptodate> stuff...
>
> <http://scarab.tigris.org/source/browse/scarab/build/build.xml?rev
> =1.33&cont
> ent-type=text/x-cvsweb-markup>
>
> Note the whole area around the check-for-turbine targets.
>
> Suggestions for improvement are welcome.
>
> -jon
>
> on 5/15/01 1:24 PM, "Roger Vaughn" <rogervaughn@yahoo.com> wrote:
>
> > --- Jesse Tilly <JTilly@hoteltools.com> wrote:
> >> Am I the only person that thinks conditional flow
> >> control using XML is just
> >> a Bad Thing(tm)?  Flow control == processing and we
> >> already have excellent
> >> processing languages.
> >
> > Build scripting is all ABOUT conditional processing -
> > i.e. "if source file A is newer than object file B,
> > compile source file A."
> >
> > This low-level conditional checking is built into Ant
> > (and make) so that you don't have to see it - and that
> > is the primary advantage of build tools over scripting
> > tools - it simplifies the required instruction set.
> >
> > This does not, however, eliminate the need for
> > conditionals at a higher level of abstraction.  Also,
> > I have several times had to use the uptodate task
> > paired with the if/unless conditions to achieve checks
> > that are *not* built into Ant - and this is
> > conceptually at the *same* level of abstraction of the
> > .java/.class checks.
> >
> > So you don't need conditional checks in your scripts.
> > How does that make them bad for everyone?  You have
> > not adequately justified your position.  Just because
> > you do not need the feature is no reason to cut the
> > rest of us off at the knees.  There are many cases
> > where this feature is indeed necessary - including the
> > script that builds Ant itself.
> >
> > Live and let live.
> >
> > Roger Vaughn
> >
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Yahoo! Auctions - buy the things you want at great prices
> > http://auctions.yahoo.com/
>
>
> --
> If you come from a Perl or PHP background, JSP is a way to take
> your pain to new levels. --Anonymous
> <http://jakarta.apache.org/velocity/ymtd/ymtd.html>
>
>


Mime
View raw message