ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "mail.laconiadatasystems.com" <webmas...@laconiadatasystems.com>
Subject Re: change to a property
Date Sat, 31 Jul 2004 18:33:40 GMT
Thats what I was looking for
Thanks Dale!
-Martin
----- Original Message -----
From: "Dale Anson" <danson@germane-software.com>
To: "Ant Users List" <user@ant.apache.org>
Sent: Saturday, July 31, 2004 12:19 PM
Subject: Re: change to a property


> Another option would be to use the 'variable' task from ant-contrib.
> 'variable' is used exactly like a property, but is mutable.
>
> Dale
>
>
> Bill Rich wrote:
> > Properties are immutable so you can not change them once they are set.
But,
> > you can specify the value multiple times so that only the first one will
> > take effect.  You can specify the value of a property on the command
line
> > (-Dprop=value).  This will be the first setting of the property so no
other
> > settings in the ant file will override it.
> >
> > Or if you can't/won't specify it on the command line you may need some
extra
> > code to determine which one you want to set in the ant file.  You could
test
> > to see if an environment var is set and use it or use a default value.
> >
> > I generally use a three tier approach --
> > 1. Set from the command line
> > 2. Set from a .properties file loaded by the ant file (before any other
> > target gets control)
> > 3. Set default value in the ant file
> >
> > Bill Rich
> > Wilandra Consulting LLC
> > 1325 Addiewell Place
> > San Jose, CA  95120-3905
> > phone:      +1 408 268-2452
> > mobile:     +1 408 410-9713
> > Santa Cruz: +1 831 464-9007
> > fax:        +1 413 669-9716
> > billrich@wilandra.com or billrich@attglobal.net
> > http://www.wilandra.com
> >
> > -----Original Message-----
> > From: mail.laconiadatasystems.com
[mailto:webmaster@laconiadatasystems.com]
> > Sent: Saturday, July 31, 2004 4:14 AM
> > To: Ant Users List
> > Subject: change to a property
> >
> > I have a situation where a default value of a property should be
overwritten
> > I was contemplating pegging the property to an environment variable but
> > couldnt find a working example Does anyone have an example of a property
> > which changes because of an environment variable change and how to
implement
> > this ???
> > thanks,
> > martin
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional
> > commands, e-mail: user-help@ant.apache.org
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> > For additional commands, e-mail: user-help@ant.apache.org
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>


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


Mime
View raw message