Re: Having problem using property to in macrodef if invoke for more than one time

2008-03-27 Thread CheeYang Chau
Yes. This is what I do now. Using antcall is safe for parallel task. I also use macrodef but only to organize tasks that don't produce property. In this case, my ant script is always safe to run in parallel and invoke macrodef for more than one time in same target. On Fri, Mar 28, 2008 at 11:09 A

Re: Having problem using property to in macrodef if invoke for more than one time

2008-03-27 Thread David Weintraub
As you've discovered: Once a property is set, it is set forever. You can use the "var" task, but it isn't safe for parallel use. The other way is to append the module's name onto the end of the property name. Another solution is to use instead of macrodef. The task gives you the similar power to

Re: Having problem using property to in macrodef if invoke for more than one time

2008-03-27 Thread CheeYang Chau
> > > > > > > > > > > > > > > > > inside macro: ${myvalue} > > > > > > > outside macro: ${myvalue} > > outside macro: ${myvalue} > > > > $ a

RE: Having problem using property to in macrodef if invoke for more than one time

2008-03-27 Thread Cyril Sagan
-Original Message- From: CheeYang Chau [mailto:[EMAIL PROTECTED] Sent: Thursday, March 27, 2008 1:51 AM To: user@ant.apache.org Subject: Having problem using property to in macrodef if invoke for more than one time Hi, I love the macrodef task. However, it has a weakness. We must be

Re: Having problem using property to in macrodef if invoke for more than one time

2008-03-27 Thread Peter Reilly
On Thu, Mar 27, 2008 at 7:34 AM, CheeYang Chau <[EMAIL PROTECTED]> wrote: > > A common, if not so nice solution, is to use an attribute value as > > a property name. > > > > For example: > > > > > > > > > > value="@{module}"

Re: Having problem using property to in macrodef if invoke for more than one time

2008-03-27 Thread CheeYang Chau
> A common, if not so nice solution, is to use an attribute value as > a property name. > > For example: > > > > > >[EMAIL PROTECTED] > > I am aware of this solution. I read some old

Re: Having problem using property to in macrodef if invoke for more than one time

2008-03-27 Thread Peter Reilly
> BR, > > Olivier > > > > > > ---- Original Message > > Subject: Having problem using property to in macrodef if invoke for more > > than one time > > > > > > From: CheeYang Chau <[EMAIL PROTECTED]> > > To: user@ant.apache

Re: Having problem using property to in macrodef if invoke for more than one time

2008-03-27 Thread Peter Reilly
On Thu, Mar 27, 2008 at 5:51 AM, CheeYang Chau <[EMAIL PROTECTED]> wrote: > Hi, > > I love the macrodef task. However, it has a weakness. We must be very > careful if using property within the macrodef. I face problem with a > macrodef that is more complicated than the following example. I ha

Re: Having problem using property to in macrodef if invoke for more than one time

2008-03-26 Thread CheeYang Chau
gt; > > > BR, > Olivier > > > Original Message ---- > Subject: Having problem using property to in macrodef if invoke for more > than one time > > > From: CheeYang Chau <[EMAIL PROTECTED]> > To: user@ant.apache.org > Date: 27/03/2008 1

Re: Having problem using property to in macrodef if invoke for more than one time

2008-03-26 Thread Olivier Gies
I recommend using the task from ant-contrib. You can se it to unset properties in macrodefs, like this: BR, Olivier Original Message Subject: Having problem using property to in macrodef if invoke for more than one time From: CheeYang Chau <[EMAIL PROTECTED]> To

Having problem using property to in macrodef if invoke for more than one time

2008-03-26 Thread CheeYang Chau
Hi, I love the macrodef task. However, it has a weakness. We must be very careful if using property within the macrodef. I face problem with a macrodef that is more complicated than the following example. I have to use dirname and condition in my macrodef, but it cause problem if I invoke macro