ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Evgeny <evgeny.zis...@gmail.com>
Subject Re: ant global properies (variable)
Date Wed, 27 Aug 2008 17:33:42 GMT
Well, with JDK 1.6 and Ant 1.7.x you can write a <scriptdef> that will do
whatever it is you want.And it will probably be shorter/easier/more readable
than any ant-out-of-the-box solution you'll come up with.

On Wed, Aug 27, 2008 at 7:04 PM, mindspin311 <connoc.mindspin@gmail.com>wrote:

>
> I have a unit-test task which uses foreach to break up a list of unit test
> files, and runs the task 'parse' on each file.
>
> When I receieve an error code, or an empty log file is created, I want to
> set a certain property to true inside the parse task. I was hoping this
> would work, but as soon as the parse task is over, and foreach goes to the
> next one again, it seems to reset the property i set to true.
>
> After parse has been called N times, the property is set to null when
> referenced in the test task after the foreach.
>
> Pretty much  is I want the equivelent of the following in ant.
>
> function blah():
>   prop = 1;
>   echo prop; #prints 1
>   call foo();
>   echo prop; #prints 2
>
> function foo();
>   echo prop; #prints 1
>   prop = 2;
>   echo prop; #prints 2
>
>
> --
> View this message in context:
> http://www.nabble.com/ant-global-properies-%28variable%29-tp19184177p19184177.html
> Sent from the Ant - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message