ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Weintraub" <qazw...@gmail.com>
Subject Re: Property selection
Date Tue, 05 Feb 2008 11:57:40 GMT
Why not have multiple property files -- each with a different
combination of properties you would want set? Then, you could have the
user specify the right build properties file on the command line:

In your build.xml:

<!-- Default -->
 <property name="build.file" value="build.properties"/>
<property file="${build.file}"/>

On the command line:

$ ant -Dbuild.file=orange.properties
$ ant -Dbuild.file=cherry.properties


On Feb 4, 2008 10:25 PM, Z W <mpc8250@gmail.com> wrote:
> Hi
>
> I have a properties file with property values set to different files.
>
> Eg:
> A.properties
> -----------------
> File_Orange=Orange.jmx
> File_Cherry=Cherry.jmx
>
> In the buildfile, could someone give examples on
> 1-  how the build.xml could select a file to run with, ie build.xml picks
> Orange.jmx or Cherry.jmx
> (I'm thinking that some kind of conditional property check is necessary to
> know which file build.xml can know to run with)
> 2 - how the build.xml know that all the files should be selected to run with
>
>
> Appreciate any help.
> Good day
>



-- 
--
David Weintraub
qazwart@gmail.com

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


Mime
View raw message