I used exactly that approach but as our projects grew larger ended up with 
massive files and awkward configuration.  As a result we have developed a 
series of custom tasks that simplify the configuration and management a lot.  
We had a set of include files (global, solution, project), a solution-level 
build script and a set of project level build scripts.  I worked very nicely 
but it was hard to maintain the separation and generic-ness that we desired.


_________________________________________

Jonathan Evans 
Developer, ECM-IT 
[EMAIL PROTECTED] 

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Michael
Frederick
Sent: Wednesday, July 19, 2006 9:32 PM
To: nant-users@lists.sourceforge.net
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
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users

==============================================================================
Please access the attached hyperlink for an important electronic communications 
disclaimer: 

http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html
==============================================================================


-------------------------------------------------------------------------
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
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to