CruiseControl.Net "Node Duplicate Detected" using precompiler
I am working with CruiseControl.Net and trying to take a dry approach as shown in the article http://www.zorched.net/2009/01/30/dry-your-cruisecontrolnet-configuration/ I have a simple ccnet.config and a simple file project Test-project.xml. The Configuration Assessment Tool tells me that "Duplicate Node Detected". Any hints / tips would be great.
Ccnet.config
<cruisecontrol xmlns:cb="urn:ccnet.config.builder">
<!-- Standard Inits -->
<cb:define name="StandardInit-block">
<webURL>http://localhost/ccnet-dashboard/?_action_ViewProjectReport=true&server=local&project=Introvert</webURL>
<artifactDirectory>D:\CC\$(ProjName)\artifact\</artifactDirectory>
<modificationDelaySeconds>120</modificationDelaySeconds>
</cb:define>
<!-- Trigger run weekly -->
<!-- Vars $(TriggerTime), $(ProjName) -->
<cb:define name="WeeklyBuild-block">
<triggers>
<scheduleTrigger time="$(TriggerTime)" buildCondition="ForceBuild" name="Nightly build at $(TriggerTime) for $(ProjName)">
<weekDays>
<weekDay>Monday</weekDay>
<weekDay>Tuesday</weekDay>
<weekDay>Wednesday</weekDay>
<weekDay>Thursday</weekDay>
<weekDay>Friday</weekDay>
</weekDays>
</scheduleTrigger>
</triggers>
</cb:define>
<cb:include href="Test-project.xml" xmlns:cb="urn:ccnet.config.builder"/>
</cruisecontrol>
code>
Test-project.xml
<project name="Test" xmlns:cb="urn:ccnet.config.builder">
<cb:scope
TriggerTime="2:30"
ProjName="Test"
ProjStarPath="" >
<!-- Standard block -->
<cb:StandardInit-block/>
<!-- Trigger block -->
<cb:WeeklyBuild-block/>
<tasks></tasks>
<publishers></publishers>
</cb:scope>
</project>
code>
a source to share
ccnet.config:
<cruisecontrol xmlns:cb="urn:ccnet.config.builder">
<!-- Standard Inits -->
<cb:define name="StandardInit-block">
<!--<webURL>http://localhost/ccnet-dashboard/?_action_ViewProjectReport=true&server=local&project=Introvert</webURL>-->
<artifactDirectory>D:\CC\$(ProjName)\artifact\</artifactDirectory>
<modificationDelaySeconds>120</modificationDelaySeconds>
</cb:define>
<!-- Trigger run weekly -->
<!-- Vars $(TriggerTime), $(ProjName) -->
<cb:define name="WeeklyBuild-block">
<triggers>
<scheduleTrigger time="$(TriggerTime)" buildCondition="ForceBuild" name="Nightly build at $(TriggerTime) for $(ProjName)">
<weekDays>
<weekDay>Monday</weekDay>
<weekDay>Tuesday</weekDay>
<weekDay>Wednesday</weekDay>
<weekDay>Thursday</weekDay>
<weekDay>Friday</weekDay>
</weekDays>
</scheduleTrigger>
</triggers>
</cb:define>
<cb:include href="Test-project.xml" />
</cruisecontrol>
Test-project.xml:
<project name="Test" xmlns:cb="urn:ccnet.config.builder">
<cb:scope
TriggerTime="2:30"
ProjName="Test"
ProjStarPath="" >
<!-- Standard block -->
<cb:StandardInit-block/>
<!-- Trigger block -->
<cb:WeeklyBuild-block/>
<tasks/>
<publishers/>
</cb:scope>
</project>
Just by running this lot via cruisecontrol on my inbox, the only problem I get is the url in the ccnet.config file. remove that and the i code pasted above this text works great.
a source to share
I also ran into this problem this week as I also decided to use this DRY approach for CruiseControl.
After the criusecontrol service started (and then it quickly crashed) I looked at the log file (C: \ CruiseControl.NET \ server \ ccnet.log for me ...) and I saw something like:
ThoughtWorks.CruiseControl.Core.Config.ConfigurationException: Duplicate node encountered: ... (the rest of the node that is causing the problem)
This at least gave me an idea of what he was having the problem with.