Return-Path: Delivered-To: apmail-ant-dev-archive@www.apache.org Received: (qmail 52626 invoked from network); 14 Nov 2003 11:42:08 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 14 Nov 2003 11:42:08 -0000 Received: (qmail 16204 invoked by uid 500); 14 Nov 2003 11:42:05 -0000 Delivered-To: apmail-ant-dev-archive@ant.apache.org Received: (qmail 16177 invoked by uid 500); 14 Nov 2003 11:42:05 -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 16144 invoked from network); 14 Nov 2003 11:42:04 -0000 Received: from unknown (HELO london.cellectivity.com) (212.18.242.163) by daedalus.apache.org with SMTP; 14 Nov 2003 11:42:04 -0000 X-MimeOLE: Produced By Microsoft Exchange V6.0.5762.3 content-class: urn:content-classes:message Subject: RE: macrodef - do attributes as properties or substitutions MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Date: Fri, 14 Nov 2003 11:42:03 -0000 Message-ID: <747F247264ECE34CA60E323FEF0CCC0C0F5168@london.cellectivity.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: macrodef - do attributes as properties or substitutions Thread-Index: AcOqnX9z6UQEvIhTTb+F7eZ/WwbKlAAA5i7Q From: "Jose Alberto Fernandez" To: "Ant Developers List" 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 > From: Stefan Bodewig [mailto:bodewig@apache.org]=20 >=20 > On Wed, 12 Nov 2003, Jose Alberto Fernandez=20 > wrote: >=20 > > From: Stefan Bodewig [mailto:bodewig@apache.org] > > > >> In which situation would " modify properties" have > >> negative effects on what you are planing to do with=20 > >> ? Do you have an enlightening example? >=20 > [attribute is called debug and would shadow a debug property] >=20 > > > > > deprecation=3D"${deprecation}" debug=3D"${debug}"/>=20 > > >=20 > I'd expect that the properties have been expanded at the=20 > point of already so there shouldn't be any shadow=20 > affecting that definition. >=20 I knew something like this will be in the answer ;-/ But never mind, my only point here is that the user of will not see the connection between the attribute and the behavior of the task. You cound achive the same example by having: =20 So here the properties should be expanded at execution time. And my comments are the same. They also apply to java tasks that use properties internally. None of our container tasks have such behavior. For example when I write: ${failonany} there is no expectation that a property called "failonany" will show up just because I use an attribute of that name. But if parallel was implemented using a macro, then you get this behavior. So now, when you use some code from some antlib somewhere, or you import some build fragment. Now you need to be aware of whether the task you want to use was an actual java task (that does not messup your properties) or is some macro-defined task that will mess up your properties with the names of all the attributes that you pass and the names of any other attributes of any other macros that that macro calls before it calls your elements. Who will understand what is going on on a large project? It will be just a mess with no benefit what so ever. Is my hyperbole compelling enough? :-) Jose Alberto =20 --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org For additional commands, e-mail: dev-help@ant.apache.org