Tim Vernum wrote:

> >  As I stated in
> > the original message, everything was working fine except for when I
> had a dependency
> > among components.
>
> Exactly.
> It works find if you only call one target, because then you only set
> the property once.
> But if you call two targets, then the propery is set in the first
> target, and NOT changed in the second target.

IC.  I was not aware that dependent targets are somehow considered
parent targets of the depender (thus the parameters set in them are set
in the depender).  Seems kind of strange, but now that I know this at
least I can understand what it is doing.

> Which is the correct behaviour as of Ant 1.2
> Properties are set when the "<property>" tag is first "executed"
> If the property tag is at the project level then it is set before any
> target is executed.
> If the property is at the target level, then it is set (and retained)
> once that target is executed.

Yes, but I thought that it only hid (or passed) parameters when there
was a distinct superior/sub-ordinate relationship, such as with the ant
or antcall task.  I didn't remember reading that this for dependencies.

> It makes a lot of sense to be able to set properties within targets.

I agree, but not to have them set by dependent targets.  But I can deal
with it.

-> richard

Reply via email to