I cannot get the conditional plugin to work that has been added to CCNet as of version 1.6 - clicky. I am running the latest version of CCNet (1.6.7258.1) and have the following code in my ccnet.config:
<project name="9iCompile">
<sourcecontrol type="svn">
<trunkUrl>http://bis-build:81/svn/Oracle/oas_forms/COPEN</trunkUrl>
<workingDirectory>C:\OAS\COPEN</workingDirectory>
<username>*</username>
<password>*</password>
<executable>C:\Program Files\VisualSVN\bin\svn.exe</executable>
</sourcecontrol>
<conditional>
<conditions>
<compareCondition>
<value1>$[ProjectType]</value1>
<value2>copen</value2>
<evaluation>equal</evaluation>
<ignoreCase>true</ignoreCase>
</compareCondition>
</conditions>
<tasks>
<nant>
<executable>C:\Program Files\nant-0.85\bin\nant.exe</executable>
<baseDirectory>C:\OAS</baseDirectory>
<buildFile>Oracle9i_Automation_v2.build</buildFile>
<targetList>
<target>build</target>
</targetList>
</nant>
</tasks>
</conditional>
<!-- more conditional statements would be here for different project types if I can get it to work -->
<parameters>
<selectParameter name="ProjectType">
<description>The type of project to operate on.</description>
<allowedValues>
<value name="COPEN">copen</value>
<value name="BCS">bcs</value>
<value name="FCDD">fcdd</value>
</allowedValues>
</selectParameter>
</parameters>
<security type="defaultProjectSecurity" defaultRight="Deny">
<permissions>
<rolePermission name="Developers" ref="Developers"/>
<rolePermission name="Accepters" ref="Accepters"/>
<rolePermission name="Releasers" ref="Releasers"/>
<rolePermission name="Administrators" ref="Administrators"/>
</permissions>
</security>
</project>
The CCNet server crashes whenever I try to run this config though with the following output:
[14:ERROR] Exception: Unused node detected:
<conditional>
<conditions>
<compareCondition>
<value1>$[ProjectType]</value1>
<value2>copen</value2>
<evaluation>equal</evaluation>
<ignoreCase>true</ignoreCase>
</compareCondition>
</conditions>
<tasks>
<nant>
<executable>C:\Program Files\nant-0.85\bin\nant.exe</executable>
<baseDirectory>C:\OAS</baseDirectory>
<buildFile>Oracle9i_Automation_v2.build</buildFile>
<targetList>
<target>build</target>
</targetList>
</nant>
</tasks>
</conditional>
----------
ThoughtWorks.CruiseControl.Core.Config.ConfigurationException: Unused
node detected:
<conditional>
<conditions>
<compareCondition>
<value1>$[ProjectType]</value1>
<value2>copen</value2>
<evaluation>equal</evaluation>
<ignoreCase>true</ignoreCase>
</compareCondition>
</conditions>
<tasks>
<nant>
<executable>C:\Program Files\nant-0.85\bin\nant.exe</executable>
<baseDirectory>C:\OAS</baseDirectory>
<buildFile>Oracle9i_Automation_v2.build</buildFile>
<targetList>
<target>build</target>
</targetList>
</nant>
</tasks>
</conditional>
at ThoughtWorks.CruiseControl.Core.Config.NetReflectorConfigurationReader.DefaultErrorProcesser.ProcessError(String message)
at ThoughtWorks.CruiseControl.Core.Config.NetReflectorConfigurationReader.<>c__DisplayClass1.<Read>b__0(InvalidNodeEventArgs args)
at Exortech.NetReflector.InvalidNodeEventHandler.Invoke(InvalidNodeEventArgsargs)
at Exortech.NetReflector.NetReflectorTypeTable.OnInvalidNode(InvalidNodeEventArgs args)
at Exortech.NetReflector.XmlTypeSerialiser.HandleUnusedNode(NetReflectorTypeTable table, XmlNode orphan)
at Exortech.NetReflector.XmlType开发者_JAVA百科Serialiser.ReadMembers(XmlNode node, Object instance, NetReflectorTypeTable table)
at Exortech.NetReflector.XmlTypeSerialiser.Read(XmlNode node, NetReflectorTypeTable table)
at Exortech.NetReflector.NetReflectorReader.Read(XmlNode node)
at ThoughtWorks.CruiseControl.Core.Config.NetReflectorConfigurationReader.Read(XmlDocument document, IConfigurationErrorProcesser errorProcesser)
at ThoughtWorks.CruiseControl.Core.Config.DefaultConfigurationFileLoader.Load(FileInfo configFile)
at ThoughtWorks.CruiseControl.Core.Config.FileConfigurationService.Load()
at ThoughtWorks.CruiseControl.Core.Config.FileWatcherConfigurationService.Load()
at ThoughtWorks.CruiseControl.Core.Config.CachingConfigurationService.Load()
at ThoughtWorks.CruiseControl.Core.CruiseServer.Restart()
at ThoughtWorks.CruiseControl.Core.Config.ConfigurationUpdateHandler.Invoke()
at ThoughtWorks.CruiseControl.Core.Config.FileWatcherConfigurationService.HandleConfigurationFileChanged(Object source, FileSystemEventArgs args)
----------
Can someone please help?? I have no idea what I'm doing wrong here or if this is a bug :( I have also posted on the ccnet-user group several days ago but have not received any response :(
I have received a response from the ccnet-user group now. The conditional block is in fact a task type so needs to be in a tasks or publishers element.
精彩评论