ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jason Rosenberg" <>
Subject Re: Problem using script task
Date Mon, 08 Jan 2001 07:52:31 GMT

----- Original Message ----- 
From: "James Duncan Davidson" <>
To: <>
Sent: Monday, January 08, 2001 1:53 AM
Subject: Re: Problem using script task

> On 1/6/01 9:40 PM, "Jason Rosenberg" <> wrote:
> > Ant is procedural, and that is what I want.  It is close to being useful,
> > to date, but just needs to add a very small set of features to close the
> > case.  Simply admitting that it is procedural would really clear the way.
> > Let's stop beating around the bush.
> Nope. Let's not. There are things that Ant needs. IMHO, turning into
> something procedural isn't one of them. I'd rather just write my
> buildscripts in JavaScript if that were the case.

Well, I got into this debate because I wanted to have reusable templates
which are applied across a large set of like modules, etc.  And, as we have
seen, Ant 1.2 is still not adequate in terms of templating, etc.  So, this
leaves us with having to use JavaScript, via the script task, if we want
to have any sort of elegance with Ant.  So, for now, not only are you
right in saying that if you want to do anything procedural, you should
use JavaScript, you also need to add that you really end up doing
everything in JavaScript anyway, even when you are using Ant.

> I come down to the opinion that calling something data or code is pretty
> tough. After all, software is just data at some point. :) However there is a
> visceral line drawn about what Ant is good for, and at what point it's not.
> That line has been labeled with the somewhat, but sort of useful terms of
> "procedural vs. declarative". Neither term is totally appropriate. But we
> use them anyway :)

Ant is a build management tool.  It's purpose is to build software.  This
means doing things like javac and javadoc and copy and ejbjar, etc.
These are all procedural tasks.  If you want to be able to represent
a software build module declaratively, then you need to be able
to define it as a data object, with attributes which define how to
build it.  In order to do this constructively, you simply have to have
templates or sub-routines, etc.

> > Yes, I think the beauty of Ant is that it has the power to keep
> > things simple and human readable.  I like the <execute-task>
> > idea mentioned by someone on another topic, or possibly a
> > simple case:
> > 
> > <case property="caseProperty">
> >   <if value="1" execute="doMainCompile"/>
> >   <if value="2" execute="doPartialBuild"/>
> >   <default execute="showErrorAndFaile"/>
> > </case>
> But here you are saying you want a "if" target implementation that could
> take any set of attributes and do something. "<execute-target>" only does
> just that. It's a difference. And, imho, it's a big one.

I don't understand what you said here.  

View raw message