> Let me throw out a different idea. Why not add propertyfiles, akin
> to the way they're done in Ant? It's a different approach, but it
> solves many of the same problems.
I may have missed something earlier in this discussion, but property files are already
supported using the <include> task. I use a system property file and project property
files, then use <include> to read them in. This lets me abstract out much of system
and project-specific settings.
I based this off the approach in Hatcher and Loughran's _Java Development with Ant_.
Snippets below. Excuse me if I've completely missed what you were talking about.
------------>%------------>%------------>%------------>%------------
<?xml version="1.0" ?>
<!--
NantSystemProperties.xml
This file contains properties set specifically for a developer's system.
Generally, these are directory, library and tool locations.
-->
<configuration>
<!-- =================================================================== -->
<!-- Global build settings -->
<!-- =================================================================== -->
<!-- Root of all .NET projects -->
<property name="root.dir" value="c:\projects\dotnet" />
<!-- =================================================================== -->
<!-- Tools -->
<!-- =================================================================== -->
<property name="nunit" value="c:\program files\nunit 2.1\bin" />
<property name="nant-contrib" value="C:\utils\nant\nantcontrib-0.85-20040717\bin"
/>
<!-- Note this is **NOT** the fxcop GUI execuatable!! -->
<property name="fxcopcmd-exe" value="C:\Program Files\Microsoft FxCop
1.30\fxcopcmd.exe" />
<!-- =================================================================== -->
<!-- Libraries -->
<!-- =================================================================== -->
<!-- Root of all libraries -->
<property name="lib.home" value="c:\projects\lib" />
<!-- Lucene -->
<property name="lucene.dir" value="${path::combine(lib.home,
'lucene.net\1.3.rc3-001\Release')}" />
</configuration>
------------>%------------>%------------>%------------>%------------
<?xml version="1.0" ?>
<!--
NantProperties.xml
This file contains properties set specifically for a project or solution.
Generally, these are output and temp directories, version numbers.
This file also includes project-specific build targets which get included (pulled)
into the master build file.
-->
<project name="BlackHawk2">
<!-- =================================================================== -->
<!-- Global build settings -->
<!-- =================================================================== -->
<property name="build.root" value="..\build" />
<property name="build.dir" value="${path::combine(build.root,'dist\project')}"
/>
<property name="build.doc.dir" value="${path::combine(build.root,'docs')}" />
<property name="build.report.dir"
value="${path::combine(build.root,'reports')}" />
...... cruft deleted ......
</project>
------------>%------------>%------------>%------------>%------------
<?xml version="1.0" ?>
<project name="myProject" default="test">
<!--
===================================================================
NAnt build file for project.
Most specific settings and tasks should be located in the NAntProperties.xml
file.
===================================================================
-->
<!-- Read in system info such as envrionment variables -->
<sysinfo />
<!-- Load properties specific to current developer's system. (File locations,
etc.) -->
<include buildfile="${sys.env.HOME}/NantSystemProperties.xml" />
<!-- Load properties specific to current project. (Leaving file as
"NantProperties.xml" lets
this build file work abstractly)
-->
<include buildfile="NantProperties.xml" />
...... cruft deleted ......
</project>
-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
Nant-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-users