Well, What Ken suggests seems to be a kind of hack (even if it'd worked as he suppose). Am I right there's no "right" way to do what I need? Maybe it makes sense to modify Target.java so that a target could take a list of comma-separated properies names and check whether all of them are true?
Max P.S. BTW, Ken says "if prop1 is true, xxx will be executed". Is it really so or "prop1" should simply be set regardless of its value? Thanks again, Max On Wed, 18 Oct 2000, Diane Holt wrote: > Ken, > > I don't think that will work. The running of the depends target isn't > based on the conditional -- only the running of the target itself is. So > "yyy" is run regardless of whether "prop1" is set, and it ends up > amounting to only a test on "prop2" being set. > > Diane > > --- Ken Wood <[EMAIL PROTECTED]> wrote: > > <target name="yyy" if="prop2"> > > <all_your_tasks_here.../> > > </target> > > > > <target name="xxx" depends="yyy" if="prop1"> > > </target> > > > > If prop1 is true, xxx will be executed. Since it > > depends on "yyy", "yyy" is 'fired up'. If "prop2" > > is true, then "yyy" is executed. > > > > Max Nalsky wrote: > > > > > > Hi! > > > > > > Sorry if I post questions that were already discussed here. > > > > > > I haven't heard of Ant a week ago, now I'm using it for all my > > projects > > > and I'm extremely happy with it! Thank all of you for developing it. > > > > > > Questions: > > > > > > 1) How can I defince a target that should be invoked only if TWO > > > properties are simultaneously set? Using > > > > > > <target name="xxx" if="prop1,prop2"> > > > > > > seem does not work. Is anyone has got an advice on it? > > > ===== > ([EMAIL PROTECTED]) > > > > __________________________________________________ > Do You Yahoo!? > Yahoo! Messenger - Talk while you surf! It's FREE. > http://im.yahoo.com/ >
