ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Diane Holt <hol...@yahoo.com>
Subject Re: Please clarify a point about properties
Date Wed, 03 Apr 2002 18:36:37 GMT
--- Erik Hatcher <jakarta-ant@ehatchersolutions.com> wrote:
> > Except you wouldn't actually need to override it that way, since it's
> > an environment variable, so you don't need to do it as a define --
> > just set it in your env. (To do it on the fly, just do
> > 'WHATEVER=my_value ant' [except under funky DOS, you have to do
> > 'set WHATEVER=my_value && ant'].)
> 
> Agreed - I was just showing how to override an environment setting,
> thats all.  Its very likely you may want it set in your environment,
> yet override it on a per-build basis for some reason.

That's what the above does -- just sets it for the invocation (except, as
usual, under funky DOS, since there's no distinction between a
set-in-the-shell var and an exported one, so you have to do:
C:\blah\blah> set WHATEVER=my_value && ant && set WHATEVER=

> > If you don't want to use the "env." property names throughout your
> > build file, just reassign it to another name once it has a value.
> 
> But the question is: how do I craft it such that I don't have
> env.WHATEVER in my properties file.  I'd rather have simply
> whatever.prop listed in my properties file, without the env prefix.
> Can you craft an example that shows that?

If you don't want to set them in a props file, then you're going to have
to set the default values for them in your build file. (Okay, not *have*
to, since you could conceivably have an rc file that sets up -D's for them
to pass on the Ant command-line, but that's just getting silly :)

And if you don't want to use the "env." names throughout the build, then
either convert their names in the build file as well, or have a props file
that does the name conversion. (The "or" being possible only if you don't
mean you don't want any reference to the "env." property anywhere in a
props file at all, even on the value side.)

Diane

=====
(holtdl@yahoo.com)



__________________________________________________
Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax
http://taxes.yahoo.com/

--
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