ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rosen, Alex" <>
Subject RE: Parameterized "task-function"
Date Thu, 11 Jan 2001 16:46:57 GMT
Maybe I'm missing something, but... to me this approach feels totally backward.
It reminds me of the systems for simulating parameterized types with
preprocessor macros, before C++ templates came along, which was an unnatural

Sorry to say, what I really want to do is "call a method" - that's what would
feel natural to me. What you're doing is adding a preprocessor, which feels
backwards - the method comes first, then the method call, instead of the other
way around.

I'm no language expert, but to me Ant (and building in general) feels like a
declarative language on top of a procedural language. You want to use a
declarative language to figure out what to build, but you really want to use a
procedural language to describe how to build it. Trying to extend the
declarativeness all the way down seems like a big mistake...

Is there anything declarative about describing how to build something (as
opposed to describing what to build)?


> -----Original Message-----
> From: Peter Donald []
> Sent: Thursday, January 11, 2001 10:24 AM
> To:
> Cc:
> Subject: Re: Parameterized "task-function"
> Usually a second file thou we could make it internal aswell I believe
> without too much trouble. A possible example would be
> (remembering that I
> also hate XSLT so may have munged the syntax):
> <xsl:template match="build-jar">
>   <javac srcdir="src/java/{@name}" destdir="build/{@name}"/>
>   <jar jarfile="{@name}.jar" basedir="build/{@name}"/>
>   <signjar jarfile="{@name}.jar" />
>   <cab cabfile="{@name}.cab" basedir="build/{@name}"/>
>   <signcab cabfile="{@name}.cab" />
> </xsl:template>
> now somewherer in your build file you would have
> <target name="foo">
>   <build-jar name="bean1" />
>   <build-jar name="bean2" />
>   <build-jar name="bean3" />
> </target>
> This would compile, jar, cab and sign the three beans so that they are
> ready for distribution via web-browser. This is just a simple
> example but
> it could get much more complex allowing you to do virtually
> everything.
> Kinda like some of those make builders ;) It is complex but
> it brings power.
> Cheers,
> Pete
> *-----------------------------------------------------*
> | "Faced with the choice between changing one's mind, |
> | and proving that there is no need to do so - almost |
> | everyone gets busy on the proof."                   |
> |              - John Kenneth Galbraith               |
> *-----------------------------------------------------*

View raw message