Reputation: 14369
I am working with CruiseControl.Net and am trying to take the dry approach as illustrated in article http://www.zorched.net/2009/01/30/dry-your-cruisecontrolnet-configuration/ I have a simple ccnet.config and a simple projectfile Test-project.xml. The configuration valuation tool tells me that “Duplicate Node Detected”. Any clues/Hints 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>
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>
Upvotes: 0
Views: 737
Reputation:
I also ran into this problem this week as I also decided to use this DRY approach for CruiseControl.
After starting the criusecontrol service (and it then quickly failing) I looked in the log file (C:\CruiseControl.NET\server\ccnet.log for me...) and I saw something like:
ThoughtWorks.CruiseControl.Core.Config.ConfigurationException: Duplicate node detected: ... (rest of the node that's causing the issue)
That at least gave me an idea of what it was having a problem with.
Upvotes: 1
Reputation: 11617
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>
Having just run this lot through cruisecontrol on my box, the only problem i get is the URL in the ccnet.config file. remove that and the code i pasted above this text works fine.
Upvotes: 0
Reputation: 10166
Not sure if it was an oversight in posting your xml files here, but you don't have an ending </project>
in Test-project.xml.
Upvotes: 0