the shared project file conditionally includes the shared property file, which conditionally includes the local property file.
<project name="public build" > <property name="file.public.properties" name="p:\proj\blabla\publicProperties.build" /> <available type="File" property="publicExists" resource="${file.public.properties}" /> <include if="${publicExists}" buildfile="${file.public.properties}" /> ... </project> ----8<------ <project name="public properties" > <!-- define shared properties --> <property name="this" value="this value" /> <property name="that" value="that value" /> <!-- include the private definitions after so they may override --> <property name="file.private.properties" name="c:\proj\blabla\privateProperties.build" /> <available type="File" property="privateExists" resource="${file.private.properties}" /> <include if="${privateExists}" buildfile="${file.private.properties}" /> </project> ----8<------ <project name="private property overrides" > <property name="this" value="this value changed" /> </project> > -----Original Message----- > From: Rodrigo B. de Oliveira [mailto:[EMAIL PROTECTED] > Sent: Tuesday, October 14, 2003 15:39 > To: Gert Driesen; [EMAIL PROTECTED]; Marion Nalepa > Subject: Re: [Nant-users] support for property files ? > > > Hmmm... But this is not exactly the same... What happens when > the included file does not exit? > > Think of the following typical scenario: > > * multiple developers with slightly different build > environments (different location for some libraries, for instance); > * the build script contains properties pointing to the > *default* locations; the build script is versioned and shared > by all developers; > * each developer can provide a build.properties file to > adjust the build script to its environment idiosyncrasies; > the build.properties is not versioned nor shared; > > How would one accomplish something on these lines with nant? > > Best regards, > Rodrigo > > ----- Original Message ----- > From: "Gert Driesen" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]>; "Marion Nalepa" > <[EMAIL PROTECTED]> > Sent: Tuesday, October 14, 2003 3:54 PM > Subject: Re: [Nant-users] support for property files ? > > > > > > ----- Original Message ----- > > From: "Marion Nalepa" <[EMAIL PROTECTED]> > > To: <[EMAIL PROTECTED]> > > Sent: Tuesday, October 14, 2003 8:39 PM > > Subject: [Nant-users] support for property files ? > > > > > > > I'm wondering if there is an equivalent ability in NAnt to Ant's > > > property file feature: > > > > > > Specifically, in Ant you can load properties from an > external file > > > such as: > > > > > > <property file="build.properties" /> > > > > > > where this file contains name/value pairs like: > > > > > > prop1=value1 > > > prop2=value2 > > > ... > > > > > > This is immensely useful to allow for a universal build > file to be > > > constructed, with each developer only having to edit an external > > > properties file to tailor the build to his/her individual system. > > > > in NAnt we just an include task which loads a "build file" > containing > > only property declarations ... > > > > eg. <include buildfile="build.properties" /> > > > > and build.properties would then look like this : > > > > <project name="build-properties"> > > <property name="prop1" value="value1" /> > > <property name="prop2" value="value2" /> > > </project> > > > > Hope this helps, > > > > Gert > > > > ------------------------------------------------------- > This SF.net email is sponsored by: SF.net Giveback Program. > SourceForge.net hosts over 70,000 Open Source Projects. See > the people who have HELPED US provide better services: Click > here: http://sourceforge.net/supporters.php > _______________________________________________ > Nant-users mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/n> ant-users > ------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. SourceForge.net hosts over 70,000 Open Source Projects. See the people who have HELPED US provide better services: Click here: http://sourceforge.net/supporters.php _______________________________________________ Nant-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/nant-users