ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <pe...@apache.org>
Subject Re: Ant <project> extension, templatized build files
Date Fri, 03 May 2002 11:25:15 GMT
Hi,

On Thu, 2 May 2002 13:55, Chad Loder wrote:
> I describe my solution below -- I'd like to know what people
> think of it. Peter, in particular, I think you and I may be trying to
> solve different problems (my needs being somewhat simpler).
>
> I'd like to get comments on this proposed solution (improvements?
> possible complications or limitations down the road for large
> projects?).

It is an interesting approach. Problems may arise in the future when you end 
up with larger numbers of subprojects (ie I currently work with about 30 in 
avalon excalibur and about 6 in ant-myrmidon) which may have other 
differences that need to be "injected" at different stages at the build.

The other problem is that you use lots of ant/antcalls which are very very 
slow (they require reparsing configuring and building project each time) and 
can consume lots of memory. Some of these problems are worsed by certain 
IDEs/editors (the IDEA editor can take 30% longer if lots of ant calls - not 
sure why).

What I would suggest is that you use XSLT to generate your build files if you 
really need the templating (alternatively just do copy paste between build 
files). For an example of XSLT in action download the jakarta-ant-myrmidon 
CVS. The following are the files to look at

jakarta-ant-myrmidon/build.xml
jakarta-ant-myrmidon/tools/xsl/build.xsl
jakarta-ant-myrmidon/*/project.xml

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.

-- 
Cheers,

Peter Donald


--
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