We use includes a great deal. The only thing you should do in your example (we are using an older version of 0.85) is to move the includes above your target.
John -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Michael Frederick Sent: Wednesday, July 19, 2006 3:32 PM To: [email protected] Subject: [NAnt-users] Do you use includes? I'm working on converting some projects to using Nant for the build infrastructure. It struck me that I should create a main structure and then use <include>s to pull in the XML for each major step. This way I could: 1) isolate the XML into discrete files. 2) re-use these files across products. 3) because of 1, I would have a much simpler main build file. For example, if my build process was clean, get, compile, my main build file would be: <project name="main" default="go"> <target name="go" depends="clean,get,compile"/> <include file="clean.build"/> <include file="get.build"/> <include file="compile.build"/> </project> With, for example, the file clean.build containing something like: <project name="clean" default="go"> <target name="go" depends="clean"/> <target name="clean"> <exec program="cmd" commandline="/c rmdir ${Clean.Root} /q /s"/> </target> </project> But as I read and watch this list, I notice that it appears that few if anyone is using this type of approach. What are the problems with the approach? Why would you not use it? There are some issues, -projecthelp doesn't expand the includes so you don't get a list of targets contained in the included files. But if I write the included files correctly, I can re-use them across products. Any thoughts about using this type of structure? ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ NAnt-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/nant-users This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the sender. This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ NAnt-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/nant-users
