ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Diane Holt <hol...@yahoo.com>
Subject RE: Setting Enviroment alias in properties file - CLARIFICATION
Date Thu, 30 May 2002 21:53:04 GMT
--- "White, Joshua A (AG, COMM)" <Joshua.White@thehartford.com> wrote:
> It's just redundant.

True.  

> If anyone has any suggestions, let me know.

The only one I could think of that didn't incur yet more redundancy was to
add a command-line flag to Ant -- so that's what I did. Now, whether it'd
be acceptable to the rest of the committers is the next question at hand.
I don't see anything wrong with it, and since most people nowadays do take
advantage of the advent of <property environment.../>, it seems reasonable
to add it as a command-line option -- much like the new -propertyfile
option (and if you always wanted it to happen, which you likely would, you
could set it in ANT_ARGS, so you wouldn't have to actually type it in the
command line everytime). But maybe there are implications to doing it as a
command-line arg that I don't see.

Anyway, if you like this approach, and you want to campaign for it, the
changes are done, so it'd just be a matter of getting it approved. I mean,
I suppose I could take the "easier to be forgiven than to get permission"
approach -- but since it wouldn't be available until 1.6 anyway...

In the meantime, if you want my Main.class so that you can do it this way,
I can send it to you. The usage is just:

$ ant -loadenv ...

or, if you prefer a different prefix than the (now) default "env":

$ ant -loadenv=myenv ...

But note that if you do specify a different prefix, it'd have to match
what you reference in your buildfiles, since there's no way in [standard]
Ant to do something like ${${env}.HOME} -- although you could do something
like that, using the ant-contrib <propertycopy> task:

$ ant -loadenv=myenv -Denv=myenv

Then in your build file:
  <propertycopy name="envHOME" from="${env}.HOME"/>

Anyway, there it is -- do with it what you will :)

Diane

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



__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.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