I actually think that "configurable properties" -
properties whose values are defined externally from
the build files - would be a useful capability. I
believe it's something that has been discussed in the
past, although I don't think it ever got out of the
discussion phase.

An XML configuration file would be a more natural
place than the environment to define such property
values, in my opinion. But the idea is the same. I
like to keep our build files somewhat static. That is,
if the path to an application changes, or I'm building
into a separate build root, I don't want to have to
change the build files. Of course, you can get a
similar feature by <include>ing a changeable build
file. 

Even without generically configurable properties, what
I would really like to see is a way to dynamically
specify paths to executables for
ExternalProgramBase-derived tasks. Requiring things to
be in the search path is a less than ideal solutions.

--- "Smith, Eric V." <[EMAIL PROTECTED]> wrote:
> I think it would cause problems.  I never want to
> specify settings in
> the environment.  I want everything to be in the
> .build file.  With this
> patch, the environment would be silently used,
> without my knowledge.
>  
> I think you're better off having a task that sets a
> property from the
> environment.  That way the usage of environment
> variables is explicit.
> 
>       -----Original Message-----
>       From: Cort Schaefer [mailto:[EMAIL PROTECTED]] 
>       Sent: Tuesday, September 10, 2002 6:15 PM
>       To: '[EMAIL PROTECTED]'
>       Subject: RE: [nant-dev] patch to support resolving
> properties
> from environment vars
>       
>       
> 
>       This would be great and would allow for individual
> customizations per a developers environment. 
> 
> 
> 
>       -----Original Message----- 
>       From: Ben Lowery [mailto:[EMAIL PROTECTED]] 
>       Sent: Tuesday, September 10, 2002 3:27 PM 
>       To: [EMAIL PROTECTED] 
>       Subject: [nant-dev] patch to support resolving
> properties from
> environment vars 
> 
>       don't know if people consider this worthwhile or
> not, but i find
> it very 
>       handy when dealing with projects broken down into
> multiple
> buildfiles.  the 
>       patch allows nant to attempt to resolve properties
> not in the 
>       PropertyDictionary from the Environment.  So, if
> you have a
> property called 
>       "build.dir" but it's not set in your project, but
> is set in your
> 
>       environment, the property will be pulling in from
> the
> environment. 
> 
>       here's the revised indexer, against
> /src/NAnt.Core/PropertyDictionary.cs 
> 
>       public virtual string this[string name] { 
>        get { 
>         string value = (string) Dictionary[(object)
> name]; 
>         if(null == value) { 
>          //try to resolve from environment 
>          value =
> System.Environment.GetEnvironmentVariable(name); 
>          if(null!=value) 
>           value = 
>       
>
ExpandProperties(System.Environment.ExpandEnvironmentVariables(value));
> 
>         } 
>         return value; 
>        } 
>        set { 
>          if (!_readOnlyProperties.Contains(name)) { 
>            Dictionary[name] = value; 
>          } 
>        } 
>       } 
> 
>       --b 
> 
> 
> 
> 
>
-------------------------------------------------------
> 
>       This sf.net email is sponsored by: OSDN - Tired of
> that same old
> 
>       cell phone?  Get a new here for FREE! 
> 
>
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
> 
>       _______________________________________________ 
>       Nant-developers mailing list 
>       [EMAIL PROTECTED] 
> 
>
https://lists.sourceforge.net/lists/listinfo/nant-developers
> 
> 
> 


__________________________________________________
Yahoo! - We Remember
9-11: A tribute to the more than 3,000 lives lost
http://dir.remember.yahoo.com/tribute


-------------------------------------------------------
In remembrance
www.osdn.com/911/
_______________________________________________
Nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers

Reply via email to