John, First I would strongly recommend that you checkout the documentation and examples at http://nant.sf.net. It will go a long way toward answering your questions. I would structure the master build something like this, assuming the order of dependency betweeen your projects. Also assuming that the master build is located the "src" directory.
<project default="buildAll"> <target name="buildAll" depends="sub4" /> <target name="sub1" > <nant buildfile="Comp2\subcomp1\subComp.build" /> </target> <target name="sub2"> <nant buildfile="Comp2\subcomp2\subComp.build" depends="sub1"/> </target> <target name="sub3" depends="sub2"> <nant buildfile="Comp1\subcomp2\subComp.build" /> </target> <target name="sub4" depends="sub3"> <nant buildfile="Comp1\subcomp1\subComp.build" /> </target> </project> Dix, John wrote: > > Hello all, > > I have been working with scripted builds for sometime now involving > .cmd files combined with either Python or Perl to get the job done. I > am now moving over to nant to do my work for me however I think I may > need to change how I am used to designing the builds. > > Before I would create a setenv.cmd file which when opening a cmd > window, it would set environment variables I need to work with > including paths and such. Then I could issue something like “build > release” and then my entire product, which is laid out in multiple > subdirectories at various levels, would then proceed to be built. > > My questions are these: > > 1. Is the best way to do what I want with nant to use the same > model and execute something like this: > > <?xml version="1.0"?> > > <project name="testing chained calling" > > > <exec program="nant.exe" > commandline="-buildfile:C:\enlistments\Main\src\Comp1\subcomp1\subcomp.build" > verbose="true" failonerror="true" /> > > <exec program="nant.exe" > commandline="-buildfile:C:\enlistments\Main\src\Comp1\subcomp2\subcomp.build" > verbose="true" failonerror="true" /> > > <exec program="nant.exe" > commandline="-buildfile:C:\enlistments\Main\src\Comp2\subcomp1\subcomp.build" > verbose="true" failonerror="true" /> > > <exec program="nant.exe" > commandline="-buildfile:C:\enlistments\Main\src\Comp2\subcomp2\subcomp.build" > verbose="true" failonerror="true" /> > > </project> > > Or is there another way? This seems like a really lame way to do it. > It works with script files, but … J > > 2. Is there a way without modifying the NAnt.exe.config file to > persist the global settings I normally setup in my setenv.cmd > file I mentioned earlier? In other words I would like to load > them into properties that can then be accessed through-out my > build environment. > > Thanks! > > -jdix > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > ------------------------------------------------------------------------ > > _______________________________________________ > NAnt-users mailing list > NAnt-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/nant-users > ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ NAnt-users mailing list NAnt-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nant-users