ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Diane Holt <hol...@yahoo.com>
Subject RE: Including a common build file with common targets.
Date Tue, 16 Oct 2001 19:52:35 GMT
--- Ylan Segal <ylan@digiworks.tv> wrote:
> >
> > You don't need this restriction -- just make the name of the file
> > you're reading in a property reference instead of a hard-coded name.
>
> Diane, that sounds even better, but then how do I set that property? on
> the command line? I guess we could do:
> 
> ant -Dprops.file=somefile.properties
> 
> Is there another way? I don't like passing properties values in the
> command line so much.

You could use an environment variable (eg., PROJECT), then just reference
${env.PROJECT}.properties (assuming you name your project properties files
with the name of the project). Since you don't like using the -D thing, if
you're running under a unix-type shell, you can change which project for a
single run by doing:

$ PROJECT=foo ant

(Don't know if DOS's "shell" will let you do that sort of thing or not.)

Diane

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



__________________________________________________
Do You Yahoo!?
Make a great connection at Yahoo! Personals.
http://personals.yahoo.com

Mime
View raw message