Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 31880 invoked from network); 25 Aug 2004 13:55:00 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 25 Aug 2004 13:55:00 -0000 Received: (qmail 26513 invoked by uid 500); 25 Aug 2004 13:54:47 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 26338 invoked by uid 500); 25 Aug 2004 13:54:45 -0000 Mailing-List: contact user-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list user@ant.apache.org Received: (qmail 26232 invoked by uid 99); 25 Aug 2004 13:54:44 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FORGED_RCVD_HELO X-Spam-Check-By: apache.org Received: from [204.127.202.56] (HELO sccrmhc12.comcast.net) (204.127.202.56) by apache.org (qpsmtpd/0.27.1) with ESMTP; Wed, 25 Aug 2004 06:54:40 -0700 Received: from nicki.visi.com (c-66-41-141-26.mn.client2.attbi.com[66.41.141.26]) by comcast.net (sccrmhc12) with SMTP id <2004082513543801200p2mcte>; Wed, 25 Aug 2004 13:54:38 +0000 Message-Id: <5.2.1.1.0.20040825084522.03e391a0@pop.shell.visi.com> X-Sender: hoju@pop.shell.visi.com X-Mailer: QUALCOMM Windows Eudora Version 5.2.1 Date: Wed, 25 Aug 2004 08:54:33 -0500 To: "Ant Users List" From: Jacob Kjome Subject: Re: Target or macrodef? In-Reply-To: <20040825084847.2dd9b803.sebastian.ssmoller@gmx.net> References: <1093362548.412b6374b8d54@my.visi.com> <20040824074458.6129f1f3.sebastian.ssmoller@web.de> <1093362548.412b6374b8d54@my.visi.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N At 08:48 AM 8/25/2004 +0200, you wrote: > > > > > hi, > > > this would be great ! > > > > > > recently, i had exactly that problem (setting a "temp" property in a > > > ) ... i had to use as work-around :( > > > > > > > Well, is just totally unnecessary. Just use the value of > > the macrodef > > attributes as a property. Obviously it becomes a property that will > > live > > throughout the app, but it is usually so unique that that you'd never > > define or > > generate another property by the same name. If the value won't be > > unique, you > > can chain multiple macrodef attribute values together to make a truly > > unique > > property. For more information, see... > > > > http://ant.apache.org/faq.html#propertyvalue-as-name-for-property > >i disagree - i guess there are of course reasons for using >and i guess my example above is one of them. > >while ur "solution" or better called "work-around" may work too i would >not use it cause THIS is an ugly hack - thats the way unmaintainable >code is produced! what u r talking about is "generating" property names >and this does definitively makes the code harder to read ... at least >IMHO ... what does a generated property name tell about its use or the >coders intention ? nothing! >i guess the best and obious solution would be to allow some kind of >variable scoping in ant. I see your point and I already referred to it as a "hack", but I disagree that it is unmaintainable. Since the property is meant to be used temporarily, the confusion will only be in one place; the macrodef itself. I would suggest simply writing a comment saying what exactly is being done. Most macrodefs aren't tremendously large so a little documentation should suffice to ease or resolve any confusion that might otherwise occur. The bloat and messiness of far outweighs any disadvantages of the current "hack" available in macrodef. Like I said before, a local property might be nice, but it won't bother me if it never makes it into Ant as the "hack" is all I need. Jake >thx >regards, >seb > > > >--------------------------------------------------------------------- >To unsubscribe, e-mail: user-unsubscribe@ant.apache.org >For additional commands, e-mail: user-help@ant.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org