ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "T Master" <tmas...@iknowledgeinc.com>
Subject Re: Setting a property value by default and as a parameter
Date Thu, 30 Aug 2001 21:47:00 GMT
Easy

Set the property in your buildfile.

Then if u set it from the command line, it takes precedence.
e,g,

ant -Dcchome="fubar"


in your build xml file, use ${cchome} to refer to it.

Define the default value at the <project> level:
    <property name="cchome" value="default"/>




T Master.

----- Original Message -----
From: "Derek Gibbs" <dgibbs@smartsynch.com>
To: <ant-user@jakarta.apache.org>
Sent: Thursday, August 30, 2001 3:01 PM
Subject: Setting a property value by default and as a parameter


> I am trying to set a property variable with a default value and also give
> the user the ability to change it from the command line. Does anyone have
a
> good way of doing this?
>
> Currently I am setting an environment variable each time that I want to
> change the default location of my source code. We are using ClearCase and
I
> have several views that I would like to build from at anytime. I have all
of
> the build script using a cchome variable that I need to have a default
value
> for as well as being able to set it from the command line.
>
> Thanks,
> Derek Gibbs
>
>
>


Mime
View raw message