Return-Path: Mailing-List: contact user-help@ant.apache.org; run by ezmlm Delivered-To: mailing list user@ant.apache.org Received: (qmail 56925 invoked from network); 19 Mar 2003 14:18:23 -0000 Received: from mail.paranor.ch (HELO nts?par1.paranor.ch) (195.65.4.180) by daedalus.apache.org with SMTP; 19 Mar 2003 14:18:23 -0000 Received: by nts_par1.paranor.ch with Internet Mail Service (5.5.2448.0) id ; Wed, 19 Mar 2003 15:18:22 +0100 Message-ID: <36E996B162DAD111B6AF0000F879AD1A76C176@nts_par1.paranor.ch> From: "Wannheden, Knut" To: Ant Users List Subject: templating buildfiles Date: Wed, 19 Mar 2003 15:18:14 +0100 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2448.0) Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C2EE22.65157900" X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N ------_=_NextPart_001_01C2EE22.65157900 Content-Type: text/plain; charset="iso-8859-1" Hi, I am sure there are other users out there who manage some kind of templates for Ant buildfiles. I know that there are many ways to do this, ranging from manual customization of a template, to using XML entities, through fully automated template instantiation using a template engine. I would like to use a template engine where I can set some variables which are substituted in the template. Also simple flow control mechanisms to control what output is generated would be nice to have. I have myself tried many different tools to use buildfile templates for our software projects. It has been quite frustrating at times and I have still not found a tool that suits my needs perfectly. I would like to use a templating engine like Velocity, FreeMarker, or JSP. But they all seem to have their drawbacks and advantages. Most template engines either: - seem to have problems with the syntax of Ant properties (as the engines think they're actually references to variables in the template language), - are limited to HTML and XML generation (OK, that's not really a problem if it's only going to be used for Ant buildfiles), - are obscure enough in syntax to make the template unreadable to the point where having a template doesn't make very much sense, - too heavyweight or hard to use standalone as they're entirely geared towards web application development, - don't support dynamic templating (instead the templates have first to be compiled to Java classes), - or of course a combination of the above. So I've ended up using the JET engine from the EMF framework (http://eclipse.org/emf/). It has a JSP-ish syntax (<%=...%>) which doesn't conflict with Ant properties (${...}). Unfortunately some parts rely the Eclipse runtime, so it's not trivial to use in standalone mode. And there's no documentation besides the source code. I'd like to know what other Ant users think about buildfile templates, what tools they use, and what experiences they've gathered. Cheers, -- knut ------_=_NextPart_001_01C2EE22.65157900--