ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Corbin <david.cor...@machturtle.com>
Subject Re: Parameterized "task-function"
Date Thu, 11 Jan 2001 18:07:51 GMT
Peter Donald wrote:
> 
> At 10:13  11/1/01 -0500, David Corbin wrote:
> >I do try to limit my re-invention.  But, when the architecture is
> >fatally flawed, it can't just be re-written.  Maybe my understanding of
> >XSLT is the thing that's fatally flawed.  Let's return to the original
> >issue.  I asked about writing parameterized tasks (with a small
> >reference to includes).  You said, XSLT will handle that.  Can you show
> >me how?  Does it require a second file, or is it integral to the
> >build.xml file?
> 
> 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.

Well, I can live with that, IFF it is in a single file...
> 
> 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               |
> *-----------------------------------------------------*

-- 
David Corbin 		
Mach Turtle Technologies, Inc.
http://www.machturtle.com
dcorbin@machturtle.com

Mime
View raw message