ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominique Devienne <>
Subject RE: Ant <project> extension, templatized build files
Date Fri, 03 May 2002 15:12:03 GMT
Very interesting Peter! Thanks for sharing that with us. Quick question
though. Why is 'call-project-target' applying <style> to the sub-project
(before calling the sub-project's target) instead of simply having
'for-all-projects' depend on 'build-files'? And both 'for-all-projects' and
'call-project-target' appear to be _private_ targets, not to be called
directly from the command line, so shouldn't you rename them
'-for-all-projects' and '-call-project-target' to prevent it?

To Wannheden, Knut [], I would be very interested is seeing
your solution, if you can share that with us that is!

Here's a simplification of Myrmidon's main build.xml file I'm referring to
in the first paragraph.

<project name="Myrmidon" default="main">


    <target name="build-files"
            description="Generates the project build files">
        <style in="buildtools/project.xml"
               processor="trax" />
        [same for all sub-projects]

    <target name="jars" description="Builds the jars for all projects">
        <antcall target="for-all-projects">
            <param name="" value="jars"/>
    [same for all public targets]

    <target name="for-all-projects">
        <antcall target="call-project-target">
            <param name="build-subproject.project" value="buildtools"/>
        [same for all sub-projects]

    <target name="call-project-target">
        <style in="${build-subproject.project}/project.xml"
               processor="trax" />
        <ant dir="${build-subproject.project}"


-----Original Message-----
From: Peter Donald [] 
Sent: Friday, May 03, 2002 6:25 AM
To: Ant Developers List
Subject: Re: Ant <project> extension, templatized build files


For an example of XSLT in action download the jakarta-ant-myrmidon 
CVS. The following are the files to look at


The first file acts as the "driver" script and generates all required build 
scripts and then delegates to them. The second is the xsl sheet used to 
transform the project descriptors into real build files. The project 
descriptors just contain unique data for each project.

Anyways I like it as a user but Adam/Darrell wrote it so they may have some 
comments on how hard/easy it was to write.


Peter Donald

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message