Stefan Bodewig wrote: >On Mon, 25 Feb 2002, Colin Sampaleanu wrote: > >>If I don't do this, then what effectively happens is that if I have >>multiple targets in the dependency chain which say they depende on >>init, as well as some other target, init will be called multiple >>times, >> >No. If all you have are depends attributes on targets and no or > tasks are involved, every target will be executed at most >once per build. Where > >ant A B > >counts as two builds, just to clarify. > >If you see some different behavior, you've found a bug - and we'd like >to have a testcase to reproduce it, of course 8-). > Ok, but there's the rub. In my build files I have a number of targets which are simply there to set certain key properties or do some lightweight work. I very of do use ant A B C D where A,B,C are only there to set things up, and D is the one the does the 'real' work. Before I started shielding my init tasks with a property so they would only run once, the init would end up running once for each target on the command-line. Pretty annoying given that it was doing a fair amount of work and printing out a number of things. In some respects what is almost needed is a reset target to support both of these behaviors, e.g. ant A B C ! D E F would do A, B, then C, but taking into account dependencies of all of them together, then reset the dependency memory, and do the same thing for D, E, and F. -- To unsubscribe, e-mail: For additional commands, e-mail: