ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jesse Tilly <JTi...@hoteltools.com>
Subject RE: looping (RE: Foreach task)
Date Mon, 11 Jun 2001 01:23:35 GMT
Peter, 

You can look at the overall issue as a "teen-parent" problem and act
accordingly OR you could pose questions that respond directly to the
opinions committers and non-committers have made.

Let me summarize my opinion about the conditional/flow-control issue and I
hope you will see what I (and some others) are trying to avoid.  Since we're
using metaphors as well as factual arguments I'll provide a more accurate
metaphor that describes my goal: I prefer that Ant not implement the Blob
Pattern (from the book, "Anti-Patterns", W Brown, Wiley Publishing) by do
anything and everything it can, just because it can.

XML is a data description language.  It was chosen by James for Ant to
*describe* a build rather than provide process instructions like Make, Jam,
etc.  Unfortunately, Ant didn't do this well from the start since it
included tasks such as <copy> and <javac>.  Heck, the idea of tasks pretty
much set Ant off on the wrong foot.  Over time, some really good descriptive
tasks have come forth like the <ejbjar> task.  It has been my hope that
Ant's core would progress and mutate to this more descriptive nature.  Why?

XML is *not* a scripting language and makes for a poor basis to create a
scripting language.  Not only that, well defined scripting langauges already
exist; some have open parsers to boot!  If Ant really needs iterative
declarations to define its build, then it should use a language better
suited than XML.  I have been examining Python as a basis for about two
months mainly because my research has shown that a descriptive build
language will not properly solve complex build situations.  If it were to do
so, such a language would require a massive paradigm shift with build
managers; something that is unlikely to happen.  

Nonetheless, I try to have opinions and voice them in my hopes that Ant does
stay close to the descriptive paradigm.  My goal is not to avoid complexity.
It's to avoid doing something just because it can be done.  It's to avoid
creating an XML-based make as that makes less sense than using Make itself.
If one argues that anything and everything should be done to "improve" the
tool without any regard to its legacy or future use, then I would say why
are any of us bothering with Ant?  Jam/Javamake/Make/etc. does everything we
already want to be done with builds.  It's only real downside is the
cross-platform issue.  However, to that I can always answer "it's up to the
user to understand how to work around that".

Okay, I've done the tried-and-true "turn the argument around" tactic;  using
it more for dramatic effect than anything.  In addition, I hope I have
provided a good explanation of mine (and I think other's) goals with Ant.
To use another metaphor (this one a little less accurate), we can all say
"Damn the torpedoes, full speed ahead!", but, then, we need to be reminded
that Captain Farragut got lucky: the torpedoes didn't explode.

Jesse

> -----Original Message-----
> From: Peter Vogel [mailto:pvogel@arsin.com]
> Sent: Sunday, June 10, 2001 3:47 AM
> To: 'ant-user@jakarta.apache.org'
> Subject: RE: looping (RE: Foreach task)
> 
> 
> Because our parents (oops, I mean "the ant committers") are
> trying to shelter us from "dangerous ideas".
> 
> We're all just a bunch of ignorant children who cannot be trusted
> to use a tool intelligently...
> 
> -Peter
> 
> > -----Original Message-----
> > From: Mike Groezinger [mailto:mike@grozinger.net]
> > Sent: Friday, June 01, 2001 11:49 PM
> > To: ant-user@jakarta.apache.org
> > Subject: Re: looping (RE: Foreach task)
> > 
> > 
> > Hi There,
> > 
> > the foreach task is also what I'm looking for!
> > What I don't understand: Why isn't it included in the CVS 
> rep. in the
> > taskdefs.optional package (at least I can't find it)? 
> > Where can I get the latest and maintained version ?
> > 
> > Cheers
> > Mike
> > 
> > 
> > "Nasgowitz, Mark (MED, GEMS-IT)" schrieb:
> > > 
> > > Thanks Chris,
> > > The foreach task with the truncate option is just what I need!
> > > The problem is that I have been using ant for build, test 
> > and publish
> > > results for C code but am unfamiliar with Java. Is it 
> > possible to get
> > > the tasks 'pre-compiled' so they can be dropped in? I plan 
> > on learning
> > > Java but time does not permit.
> > > 
> > > Thanks for any help.
> > > Mark
> > > 
> > > -----Original Message-----
> > > From: Christopher Berry [mailto:christopher.berry@etrade.com]
> > > Sent: Thursday, May 31, 2001 10:34 AM
> > > To: 'ant-user@jakarta.apache.org'
> > > Subject: RE: looping (RE: Foreach task)
> > > 
> > > Greetings,
> > > 
> > > In keeping with the spirit of this marvelous list, I am 
> > posting back an
> > > updated version of the optional <foreach> Task. It had a 
> > bug in it which
> > > I
> > > have fixed. In addition, I have also added a 
> type="truncate", which
> > > passes
> > > on only the base filename. (i.e. a file named myfile.tar.gz 
> > will show up
> > > as
> > > myfile in the target)
> > > 
> > > Cheers,
> > > -- Chris
> > > 
> > > > -----Original Message-----
> > > > From: Christopher Berry [mailto:christopher.berry@etrade.com]
> > > > Sent: Tuesday, May 29, 2001 9:22 PM
> > > > To: 'ant-user@jakarta.apache.org'
> > > > Subject: RE: looping
> > > >
> > > >
> > > > This looks like just what the doctor ordered. I'm sorry I
> > > > missed it on my
> > > > search of the archives -- I searched on "loop"....
> > > > Thanks (yet again) Diane.
> > > > Cheers,
> > > > -- Chris
> > > >
> > > > > -----Original Message-----
> > > > > From: Diane Holt [mailto:holtdl@yahoo.com]
> > > > > Sent: Tuesday, May 29, 2001 8:28 PM
> > > > > To: ant-user@jakarta.apache.org
> > > > > Subject: Re: looping
> > > > >
> > > > >
> > > > > A <foreach> task that may do what you need was submitted to
> > > > > the list by
> > > > > Tim Vernum. You can find the original in the archives at:
> > > > >   http://marc.theaimsgroup.com/?l=ant-dev&m=98803020500754&w=2
> > > > >
> > > > > And a follow-up version by Chris Greenlee with a "type"
> > > > > attribute added
> > > > > at:
> > > > >   http://marc.theaimsgroup.com/?l=ant-dev&m=98842104504477&w=2
> > > > >
> > > > > Diane
> > > > >
> > > > > --- Christopher Berry <christopher.berry@etrade.com> wrote:
> > > > > > Greetings,
> > > > > >
> > > > > > I am attempting to accomplish the following: For an 
> > unknown set of
> > > > > > TAR.GZ
> > > > > > files in a directory, loop over these files and unpack each.
> > > > > >
> > > > > > I checked the archives and do not see a Ant solution for
> > > > > this problem.
> > > > > > Is
> > > > > > that correct??
> > > > > >
> > > > > > Some have suggested that this should be done w/ XSLT. 
> > Is that "The
> > > > > > Way"?? If
> > > > > > so, could someone provide a HowTo for this approach??
> > > > > >
> > > > > > Or should I write a Task of my own??
> > > > > >
> > > > > > Thanks very much,
> > > > > > -- Chris
> > > > > >
> > > > > > Chris Berry  --- christopher.berry@etrade.com  -- 
> 512-323-9479
> > > > > >
> > > > >
> > > > >
> > > > > =====
> > > > > (holtdl@yahoo.com)
> > > > >
> > > > >
> > > > >
> > > > > __________________________________________________
> > > > > Do You Yahoo!?
> > > > > Get personalized email addresses from Yahoo! Mail - only $35
> > > > > a year!  http://personal.mail.yahoo.com/
> > > > >
> > > >
> > 
> 

Mime
View raw message