On my
builds, I have a separate file that just contains properties and nothing
else. For example,
<?xml version="1.0" encoding="utf-8"
?>
<project xmlns="http://tempuri.org/nant-vs.xsd" name="Global Properties">
<property name="isGlobalPropertyFileIncluded" value="true"
/>
<!-- System Properties --> <property name="dotNetFramework.dir" value="c:\WINNT\Microsoft.NET\Framework\v1.0.3705" /> <property name="log4net.dir" value="c:\projects\Utils\log4net\bin" /> <property name="nUnit.dir" value="c:\projects\Utils\nUnit\bin" /> <property name="nAnt.dir" value="c:\projects\Utils\nAnt\bin" /> <...>
</project>
Then I
include it in my main build file with the include task.
<include buildfile="globalProperties.include"
/>
This
works very well for me and my team. If a user wants to customize a build,
they open this "Properties" build file and change the
properties.
Not
sure if this will help your situation Gert.
Jason -----Original Message-----
From: Scott Hernandez [mailto:[EMAIL PROTECTED] Sent: Monday, March 03, 2003 12:54 AM To: [EMAIL PROTECTED] Subject: Re: [nant-dev] reading property values from external file Yes, we plan to support loading properties from an
xml file, and/or some other configuration location. This has not come up, and
nobody has done any work on this, as I remember. I expect when we have a way of
specifying configuration info there will be a place to set global/default
properties. We will need to address user/system/project properties.
With the proposed changes to <foreach> you
should be able to specify something like the following:
<foreach item="Line" in="properties.csv" delim=","
property="x,y">
<property name="${x}"
value="${y}"/>
</>
where properties.cvs is
prop1, value
prop2, value
I'm fine with comparing ant and nant features. I'm
sure the ant team, and their users, have learned a lot in the many years of
development and use. I'm happy to leverage all their knowledge and experiences.
The features that ant has should all be provided by NAnt in one way or another.
:)
|
Title: Message
- [nant-dev] reading property values from external file Gert Driesen
- Re: [nant-dev] reading property values from external ... Scott Hernandez
- [nant-dev] Available task Gert Driesen
- Re: [nant-dev] Available task Ian MacLean
- Re: [nant-dev] Available task Gert Driesen
- Re: [nant-dev] Available task Ian MacLean
- Morris, Jason