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
You could also use beanshell. Not sure if this works due to a bug or feature. We use it very sparingly in our build process (analagous to like goto in C). inside macro: ${myvalue}

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
On Thu, Mar 27, 2008 at 6:23 AM, CheeYang Chau <[EMAIL PROTECTED]> wrote: > I do run the macrodef in parallel using parallel task. Do you think > using var task will work ? There are lots of tasks that are *not* safe with using in the task and is one of them. If possible do not use Peter > >

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
I do run the macrodef in parallel using parallel task. Do you think using var task will work ? On Thu, Mar 27, 2008 at 2:15 PM, Olivier Gies <[EMAIL PROTECTED]> wrote: > I recommend using the task from ant-contrib. You can se it to > unset properties in macrodefs, like this: > > > > BR, > Ol

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: user@an