Ok to answer my own question.  Although the entity declarations may not work
the Include task looks like a suitable replacement.

Docs don't appear to be too explicit as to whether the buildfile property
path is relative to the including XML file or the current directory.  It
appears to be the current directory...

How does this work when the -find option is used?  If I run Nant from a
subdir and it finds a buildfile in a higher directory with an include task
it will attempt to find the build file relative to my current directory when
it should be relative to the including build file.
 

Darren

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]] On Behalf Of Darren Syzling
Sent: 23 December 2002 22:05
To: [EMAIL PROTECTED]
Subject: [Nant-users] Including central build rules

I'm trying to centralise some of my build rules using entity declarations
and including within a Nant build file.  Something like:

<!DOCTYPE project [
<!ENTITY common-build-rules SYSTEM "file:build\common-build-rules.xml">]>

and then including the entity declaration within the project section:

<project name="whatever" default="help" basedir=".">
  
  &common-build-rules;


I receive:

INTERNAL ERROR
System.NullReferenceException: Object reference not set to an instance of an
object.
   at SourceForge.NAnt.LocationMap.GetXPathFromNode(XmlNode node)
   at SourceForge.NAnt.LocationMap.GetLocation(XmlNode node)
   at SourceForge.NAnt.TaskFactory.CreateTask(XmlNode taskNode, Project
proj)
   at SourceForge.NAnt.Project.InitializeProjectDocument(XmlDocument doc)
   at SourceForge.NAnt.Project.Execute()
   at SourceForge.NAnt.Project.Run()
Please send bug report to [EMAIL PROTECTED]
Try 'nant -help' for more information


Anyone else experienced problems with this?



Darren



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Nant-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-users



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Nant-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to