ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erik Hatcher" <jakarta-...@ehatchersolutions.com>
Subject Re: Scope of a property
Date Thu, 29 Nov 2001 21:48:59 GMT
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" <holtdl@yahoo.com>
To: "Ant Users List" <ant-user@jakarta.apache.org>
Sent: Thursday, November 29, 2001 2:33 PM
Subject: Re: Scope of a property


> --- Erik Hatcher <jakarta-ant@ehatchersolutions.com> 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
>
> =====
> (holtdl@yahoo.com)
>
>
>
> __________________________________________________
> 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:ant-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message