ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erik Hatcher" <jakarta-...@ehatchersolutions.com>
Subject Re: setting property
Date Sat, 01 Dec 2001 01:08:52 GMT
<property environment="env" />
<property name="env.PROJECT_HOME" value="c:\project"/>
<property name="project.home" value="env.PROJECT_HOME"/>

because of property immutability, if it gets set with the environment (1st
line above) then it won't get set with the 2nd line.  The 3rd line just puts
it into a cleaner name - although you could stick with env.PROJECT_HOME
instead of project.home.

Ain't that better?!  :)

    Erik



----- Original Message -----
From: "Vishweshwar, Ghanakota" <GVishweshwar@firstam.com>
To: "'Ant Users List'" <ant-user@jakarta.apache.org>
Sent: Friday, November 30, 2001 7:48 PM
Subject: RE: setting property


> Here is the scenario:
> I am defining global properties for my project in a separate file, which I
> will include in the individual build files using external entities in XML.
> I also want to give the flexibility of overriding these values thru'
> environment variables.
> something like this:
> <property environment="env" />
> <property name="project.home" value="c:\project"
> unless="${env.PROJECT_HOME}" />
>
> sorry for not being descriptive enough in the first mail!
>
> thanks,
> vishu
>
> > -----Original Message-----
> > From: Erik Hatcher [mailto:jakarta-ant@ehatchersolutions.com]
> > Sent: Friday, November 30, 2001 4:30 PM
> > To: Ant Users List
> > Subject: Re: setting property
> >
> >
> > Would you mind sharing a bit more of the specific scenario and problem
> > you're trying to solve with this request?  Perhaps there are
> > other ways of
> > accomplishing what you're after.
> >
> >
> > ----- Original Message -----
> > From: "Vishweshwar, Ghanakota" <GVishweshwar@firstam.com>
> > To: <ant-user@jakarta.apache.org>
> > Sent: Friday, November 30, 2001 3:51 PM
> > Subject: setting property
> >
> >
> > > Hi All,
> > > Is there anyway to set a global property (not thru' -D) only if an
> > > environment variable is not set? I can't use "condition"
> > since it's not
> > > child of "project".
> > >
> > > thanks,
> > > vishu
> > >
> > > "MMS <firstam.com>" made the following
> > >  annotations on 11/30/01 12:52:02
> > >
> > --------------------------------------------------------------
> > ------------
> > ----
> > > "THIS E-MAIL MESSAGE AND ANY FILES TRANSMITTED HEREWITH,
> > ARE INTENDED
> > SOLELY FOR THE USE OF THE INDIVIDUAL(S) ADDRESSED AND MAY CONTAIN
> > CONFIDENTIAL, PROPRIETARY OR PRIVILEGED INFORMATION.  IF YOU
> > ARE NOT THE
> > ADDRESSEE INDICATED IN THIS MESSAGE (OR RESPONSIBLE FOR
> > DELIVERY OF THIS
> > MESSAGE TO SUCH PERSON) YOU MAY NOT REVIEW, USE, DISCLOSE OR
> > DISTRIBUTE THIS
> > MESSAGE OR ANY FILES TRANSMITTED HEREWITH.  IF YOU RECEIVE
> > THIS MESSAGE IN
> > ERROR, PLEASE CONTACT THE SENDER BY REPLY E-MAIL AND DELETE
> > THIS MESSAGE AND
> > ALL COPIES OF IT FROM YOUR SYSTEM."
> > >
> > >
> > ==============================================================
> > ==============
> > ==
> > >
> > >
> > > --
> > > 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>
>
>
> "MMS <firstam.com>" made the following
>  annotations on 11/30/01 16:49:12
> --------------------------------------------------------------------------
----
> "THIS E-MAIL MESSAGE AND ANY FILES TRANSMITTED HEREWITH, ARE INTENDED
SOLELY FOR THE USE OF THE INDIVIDUAL(S) ADDRESSED AND MAY CONTAIN
CONFIDENTIAL, PROPRIETARY OR PRIVILEGED INFORMATION.  IF YOU ARE NOT THE
ADDRESSEE INDICATED IN THIS MESSAGE (OR RESPONSIBLE FOR DELIVERY OF THIS
MESSAGE TO SUCH PERSON) YOU MAY NOT REVIEW, USE, DISCLOSE OR DISTRIBUTE THIS
MESSAGE OR ANY FILES TRANSMITTED HEREWITH.  IF YOU RECEIVE THIS MESSAGE IN
ERROR, PLEASE CONTACT THE SENDER BY REPLY E-MAIL AND DELETE THIS MESSAGE AND
ALL COPIES OF IT FROM YOUR SYSTEM."
>
>
============================================================================
==
>
>
> --
> 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