Return-Path: Delivered-To: apmail-ant-dev-archive@www.apache.org Received: (qmail 26862 invoked from network); 20 Oct 2003 10:43:10 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 20 Oct 2003 10:43:10 -0000 Received: (qmail 77634 invoked by uid 500); 20 Oct 2003 10:43:07 -0000 Delivered-To: apmail-ant-dev-archive@ant.apache.org Received: (qmail 77595 invoked by uid 500); 20 Oct 2003 10:43:07 -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 77571 invoked from network); 20 Oct 2003 10:43:06 -0000 Received: from unknown (HELO london.cellectivity.com) (212.18.242.163) by daedalus.apache.org with SMTP; 20 Oct 2003 10:43:06 -0000 content-class: urn:content-classes:message Subject: RE: Macrodef and parallel in a recursive situation Date: Mon, 20 Oct 2003 11:43:06 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Message-ID: <747F247264ECE34CA60E323FEF0CCC0C5D08D0@london.cellectivity.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: X-MimeOLE: Produced By Microsoft Exchange V6.0.5762.3 Thread-Topic: Macrodef and parallel in a recursive situation Thread-Index: AcOW6GFXyrul9SZtTgWd1dRH3WxLDwADjdow 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 Peter,=20 sounds great. How does your implementation using threadLocal works when going across or ? Just curious. Jose Alberto > -----Original Message----- > From: peter reilly [mailto:peter.reilly@corvil.com]=20 > Sent: 20 October 2003 09:59 > To: Ant Developers List > Subject: Re: Macrodef and parallel in a recursive situation >=20 >=20 > I have written the code to support local properties. > While I was doing this, I realized that the attributes > of a macrodef could/should be local properties as well,=20 > removing some of the issues seen last week (use of attribute=20 > in a bsf script and support of parallel/recursive). >=20 > The following shows it in using a new task called local. >=20 > > > > > prop1 is "${prop1}" > > > prop1 is "${prop1}" > > >=20 > This ant test2 generates the following: >=20 > test1: > prop1 is "a local value" >=20 > test2: > prop1 is "a global value" >=20 > Each taskcontainer sets up a new local scope: >=20 > > > > > prop2 is "${prop2}" > > prop2 is "${prop2}" > >=20 > will generate the following: > sequential: > prop2 is "in sequential" > prop2 is "in target" >=20 > The value part of is optional, and the local > property may be set by a subsequent , > will only set it if the value is not set. >=20 > > > prop3 is "${prop3}" > > > prop3 is "${prop3}" > >=20 > will generate the following: > notset: > prop3 is "${prop3}" > prop3 is "is set" >=20 > prop3 is still a local variable and will not be seen outside=20 > the target. >=20 > The local properties are thread local so the following works=20 > as expected: > > > > > > t1: prop4 is "${prop4}" > > > > t2: prop4 is "${prop4}" > > > > t3: prop4 is "${prop4}" > > > >=20 > parallel: > t2: prop4 is "thread2" > t1: prop4 is "thread1" > t3: prop4 is "thread3" >=20 > Use with macrodef. > ----------------- >=20 > Attributes may now be implemented as local properties, which=20 > means that they will be seen as normal properties by ant=20 > tasks - including script. >=20 > > > > > > > >=20 > > >=20 > will generate: > macro: > x is 'this is x' >=20 > Macrodef does not do the attribute substitutions so the following > > > > > > > >=20 > > > will generate: > macro2: > x is '${x}' > as