Oops.... I stand corrected. Thanks Diane. Thats what I get for posting without trying it first.
I never really use the multiple target command-line feature, and spoke out of line Sorry for the confusion. Erik ----- Original Message ----- From: "Diane Holt" <[EMAIL PROTECTED]> To: "Ant Users List" <[EMAIL PROTECTED]> Sent: Thursday, November 29, 2001 2:33 PM Subject: Re: Scope of a property > --- Erik Hatcher <[EMAIL PROTECTED]> wrote: > > > For example, > > > > > > <target name="myInit"> > > > <property name="Me" value="IsMe"/> > > > </target> > > > > > > <target name="showMe"> > > > <echo message="${Me}"/> > > > </target> > > > > > > the above echo will not display any. > > > > > > > These two targets are never executed at the same time. You'd run these > > by doing one of: > > > > ant myInit showMe > > > > -or- > > > > ant myInit > > ant showMe > > > > Both are essentially equivalent and each invocation starts fresh with > > properties. > > Huh? There's a big difference between the first and the second -- the > first will result in running the "myInit" target and the "showMe" target > within the same execution of 'ant', so the <echo> of the "Me" property > will have a value for the property. The second will run the "myInit" > target within one execution of 'ant', then the "showMe" target within > another execution of 'ant', so the <echo> of the "Me" property will not > have a value. > > Diane > > ===== > ([EMAIL PROTECTED]) > > > > __________________________________________________ > Do You Yahoo!? > Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month. > http://geocities.yahoo.com/ps/info1 > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> > > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>