ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Wannheden, Knut" <knut.wannhe...@paranor.ch>
Subject RE: [SUBMIT] Xinclude task
Date Thu, 06 Jun 2002 13:48:30 GMT
Hi Ernst,

Yes, I can see your point.  But I was thinking about a on-the-fly inclusion
mechanism, where I wouldn't have to merge two files into one file.  Ant
would upon encountering the task inline the code from the referenced file.
But this would probably require modifications to the core to support
XInclude (http://www.w3.org/TR/xinclude/).

I do something similar as you do, but differently.  I have a custom
ProjectHelper which first creates the buildfile to be processed (with some
XSLT transformations) and then passes it on to Ant's default ProjectHelper.
I also had to modify Ant's Main class because it complains if the buildfile
supplied on command line doesn't exist ;-)  I just wanted an approach where
I didn't need a dozen of other files for every project making it less
flexible to change.  Especially when under source control.

But maybe I can make some use of your <xinclude> task aswell.

Cheers,

--
knut

> -----Original Message-----
> From: Ernst de Haan [mailto:ernsth@nl.euro.net]
> Sent: Donnerstag, 6. Juni 2002 11:10
> To: Ant Developers List; Wannheden, Knut
> Subject: Re: [SUBMIT] Xinclude task
> 
> 
> Hi Knut,
> 
> > I was hoping that the <xinclude> task you submitted would 
> actually allow me
> > to include some external file into the Ant buildfile.  I 
> have been using
> > the <ejen> task (http://ejen.sourceforge.net/) for some 
> time now, and with
> > it you can achieve the same effect as with <xinclude> and 
> much more.  Just
> > thought I'd mention it here.
> 
> You can. Just think a bit further. Actually, I do something 
> similar myself. 
> I've got the following files:
> 
> * build.xml
> * webapps.xml
> * subproj1/webapp.xml
> * subproj2/webapp.xml
> * webapps2webapps_with_includes.xslt
> * webapps_complete2build.xslt
> * webapps_complete2web.xslt
> 
> The build.xml is in fact only a proxy to another build file I 
> generate from 
> webapps.xml and subprojX/webapp.xml. Steps performed by build.xml:
> 
> 1) webapps.xml is converted to webapps_with_includes.xml 
> using the <style /> 
> task with webapps2webapps_with_includes.xslt as the XSLT 
> template. The 
> webapps_with_includes.xml contains an <xi:include /> 
> instruction for each 
> subprojX/webapp.xml.
> 2) webapps_with_includes.xml is processed by the <xinclude /> 
> task so that it 
> includes all subprojX/webapp.xml files. The result is 
> webapps_complete.xml
> 3) webapps_complete.xml is converted to build2.xml
> 4) webapps_complete.xml is converted to web.xml (JavaSoft 
> web-app XML file)
> 5) the build2.xml file is called from the current build.xml
> 
> 
> Ernst
> 
> -- 
> Ernst de Haan
> EuroNet Internet B.V.
> 
>     "Come to me all who are weary and burdened
>         and I will give you rest" -- Jesus Christ
> 

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message