views:

562

answers:

7

I have a CC.NET project configured to call a common NAnt build file, which does some stuff, and then calls a child NAnt build file. The child build file name is specified by CC.NET to the command build file using a property.

The hurdle that I am trying to get over is that the common build file log gets overwritten by the child build file log, so I don't get the common build log in the CC.NET build log.

Anyone have any ideas on how to fix this?

I thought about changing the child build's log, but reading up on the NAnt <nant> task doesn't allow me to change the child's output log.

A: 

Is there any way that you could include the child nant file as opposed to executing it as a full-fledged child nant project? This would prevent the overwrite, but not sure if it's possible in your situation.

Peter Meyer
A: 

Does setting Nant's log settings to append help?

Jon Limjap
+1  A: 

Use the nant task, so you get one single build file.

Brad Wilson
A: 

@Peter, can you give more detail? Where do I include the child nant, CC.NET config or the common nant file?

@Jon - more detail please. Note that I already mentioned that the nant task in nant doesn't allow me to change the log file location, unfortunately. If I could, still, how to merge the two together?

@Brad - ?

slolife
A: 

How are you calling the child NAnt file? Are you using <nant>, as Brad suggested?

Sören Kuklau
A: 

@Soeren: Yes, here is the nant task in my common nant:

<nant buildfile="${build.filepath}">
 <properties>
  <property name="svn.trunkurl" value="${svn.trunkurl}"/>
  <property name="svn.username" value="cbecker"/>
  <property name="svn.password" value="cifbec"/>
 </properties>
</nant>

There doesn't appear to be a way to specify a log file.

slolife
A: 

Hmm, now that I've worked out the bugs/errors in the parent nant, it now seems to be magically working as hoped. I don't actually do anything to the nant log files, but the final bug log includes both the parent and child logs.

Weird that errors in the parent are causing the parent log to be overwritten. But as soon as I fixed the errors, the child was appended to the parent.

Sorry for the work guys. Thanks for your help.

slolife