forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "J.Pietschmann" <>
Subject Re: Build targets (was: Re: Need todo list for Cocoon transition)
Date Fri, 05 Jul 2002 22:48:59 GMT
Steven Noels wrote:
> Yep, the idea is to generate Ant build.xml snippets using XSLT starting 
> from the forrest.xconf file and then include those using XML entities, 
> the Ant or your new Import Task in the main build environment. I'm 
> biased towards the Ant 'Ant' Task right now, since I assume it is 
> working already and offers some isolation between the different projects 
> being build by Forrest. But I would be happy to switch to another 
> approach if someone suggests me to do so.

Instead of generating snippets and combine them with other
snippets to a build.xml, you can pull in premanufactured
XML from the XSLT:
  <xsl:copy-of select="document('boilerplate.xml')/*/*"/>

You can even have a neat template for build.xml if you want:
<project xmlns:t="forrest.template">
   <target name="dist" depends="dist-src">
     <t:depends target="dist"/>
     <copy todir="${dist.src.result.dir}">
       <fileset refid="dist.src"/>

and in the xslt use the copy-through, pull the project
specific config file into a variable $proj and use stuff
   <xsl:template match="t:dist-files">
      <xsl:apply-templates select="$proj/dist/additional-files"/>
   <xsl:template match="dist/additional-files">
     <fileset dir="{dir}" include="{filepattern}/>
(the t:depends got a bit lengthy, sorry)
Use a namespace for the project specific config if you want
to be sure that there will be no name clashes in the template


View raw message