Return-Path: Delivered-To: apmail-ant-dev-archive@www.apache.org Received: (qmail 10582 invoked from network); 10 Nov 2010 13:23:14 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 10 Nov 2010 13:23:14 -0000 Received: (qmail 49665 invoked by uid 500); 10 Nov 2010 13:23:45 -0000 Delivered-To: apmail-ant-dev-archive@ant.apache.org Received: (qmail 49326 invoked by uid 500); 10 Nov 2010 13:23:42 -0000 Mailing-List: contact dev-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Ant Developers List" Reply-To: "Ant Developers List" Delivered-To: mailing list dev@ant.apache.org Received: (qmail 49318 invoked by uid 99); 10 Nov 2010 13:23:40 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Nov 2010 13:23:40 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of whaefelinger@gmail.com designates 209.85.214.173 as permitted sender) Received: from [209.85.214.173] (HELO mail-iw0-f173.google.com) (209.85.214.173) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Nov 2010 13:23:34 +0000 Received: by iwn36 with SMTP id 36so856491iwn.4 for ; Wed, 10 Nov 2010 05:23:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type:content-transfer-encoding; bh=JHFMb/Mlh9ZL/pY2EUQ/2+w7TizNvQtCvnvc1/N5Xls=; b=DF/R64n8fmSUvtC/TOO3d+BwMiPX7ejhjIaDeC7DyERcI2zCnVOd2BhP6Bw466ryIg X+UqRXV7ZdNRsj25ACjsaRP7MZSPAxoNbfKawS/F0NimquNZLxAnAGRQIQwMRhLPb7eX 4AClaPFajrzwOXqtrS0hoMdcZ/3MYMflrn+HQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; b=mtQI5eIZF8lSWCtK5DwzSPQAoJ2ASsOnB2tqt5o1TxfGfFGuJGdiQAjBJdlTFkMU80 9cekxd2JzxdATiUVi+n+8/suyWTYBdPU3yrGeOsZUSzgWO+2wwgtQd0xenPxS8h8VeEy ljmMUIwllWIGcsecM7SwnNXM+6TYN0x6iKgZ8= MIME-Version: 1.0 Received: by 10.231.11.200 with SMTP id u8mr675374ibu.123.1289395392933; Wed, 10 Nov 2010 05:23:12 -0800 (PST) Received: by 10.220.190.202 with HTTP; Wed, 10 Nov 2010 05:23:12 -0800 (PST) Date: Wed, 10 Nov 2010 14:23:12 +0100 Message-ID: Subject: API question on properties From: wolfgang haefelinger To: dev@ant.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org Hello Ant Developers, I believe the API regarding properties is incomplete (at least from a performance point of view). A bit of background information: I make use of the new property API (1.8.1) which allows me to evaluate ${..} in a different way. In my case, the body ${..} will be a Java Unified Expression (EL), see [1]. Now, EL comes with it's own object storgage and with the help of additional tasks, a user can create "EL properties". Assume this task would be " similar to Ant's property task. Then there could be something like At this point there is a property named "p" in EL's storage and a property named "p" in Ant's default storage. Then, assume that there is this task and that "handling of EL" has been enabled. ${p} ${property.p} The first embedded ${p} resolves to the object in EL's storage, cause PropertyEvaluators are added in LIFO order. In my case, that is exactly what I want (in general, I believe it is better to let the user determine the order). However, I also want to give my users the chance to explicitly reference the object in Ant's storage, i.e. the Ant "string" property. That's what the second embedded reference, ${property.p} is all about. My question is how to access to Ant property 'p' in a given project? Obviously (?) I can't make use of Project.getUserProperty(String propertyName) cause this would invoke my own EL property evaluator. All I found is Project p =3D ... String name =3D 'p'; p.getProperties().get(name); However, a closer look to getProperties() reveals that this method is essentially implemented as public Hashtable getProperties() { //avoid concurrent modification: synchronized (properties) { return new Hashtable(properties); } // There is a better way to save the context. This shouldn't // delegate to next, it's for backward compatibility only. } =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D So my question is essentially how to retrieve an Ant property in Ant's stor= age? =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D Greetz, Wolfgang. [1] http://en.wikipedia.org/wiki/Unified_Expression_Language --=20 Wolfgang H=E4felinger h=E4felinger IT - Applied Software Architecture http://www.haefelinger.it +31 648 27 61 59 --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org For additional commands, e-mail: dev-help@ant.apache.org