ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ernst de Haan <ern...@nl.euro.net>
Subject Re: [SUBMIT] Xinclude task
Date Thu, 06 Jun 2002 09:09:33 GMT
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

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message