Return-Path: Delivered-To: apmail-ant-dev-archive@www.apache.org Received: (qmail 12141 invoked from network); 26 Oct 2003 22:54:33 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 26 Oct 2003 22:54:33 -0000 Received: (qmail 88490 invoked by uid 500); 26 Oct 2003 22:54:18 -0000 Delivered-To: apmail-ant-dev-archive@ant.apache.org Received: (qmail 88327 invoked by uid 500); 26 Oct 2003 22:54:18 -0000 Mailing-List: contact dev-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Ant Developers List" Reply-To: "Ant Developers List" Delivered-To: mailing list dev@ant.apache.org Received: (qmail 88314 invoked from network); 26 Oct 2003 22:54:17 -0000 Received: from unknown (HELO ignitemedia.com) (64.157.167.108) by daedalus.apache.org with SMTP; 26 Oct 2003 22:54:17 -0000 X-MimeOLE: Produced By Microsoft Exchange V6.0.6249.0 Content-Class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C39C14.460D53EB" Subject: Tale from the front: macrodef nesting Date: Sun, 26 Oct 2003 16:55:38 -0600 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Tale from the front: macrodef nesting thread-index: AcOcFEYBH+VnQzB+TGeD7sfOjElUOg== From: "Steve Cohen" To: X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N ------_=_NextPart_001_01C39C14.460D53EB Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable I am now trying to experiment with some of the new features of ant 1.6. = Here's a real-world example of the difficulties of trying to replace = antcalls with macrodefs. Given the following definitions, notice that I am trying to nest a call = to the macrodef make.precompiled.web.xml inside a call to the macrodef = make.se.war. This is failing because I am trying to use the ATTRIBUTE war.webxml = inside the ELEMENT precompile which contains a call to the nested = macrodef make.precompiled.web.xml. I could easily fix this by substituting the actual value of the = war.webxml attribute for the ${war.webxml} token. But then I lose the = advantage of defining this in a single place. Or I can create properties in the macrodef and pass them around, but = that feels wrong too. =20 Maybe there should be some mechanism for allowing inner macrodefs for = inheriting attributes from an outer macrodef. Maybe elements should be = able to be defined with nested attributes. Or something. But this experience with trying to use this feature leads me to the = feeling that using the same notation for macrodef attributes and ant = properties is not a good thing. It will definitely cause confusion. At = a minimum more documentation of this is required. =20 =20 =20 =20 =20 =20 =20 =20 ------_=_NextPart_001_01C39C14.460D53EB--