2

从 1.6 版开始,我无法使添加到 CCNet 的条件插件正常工作 - clicky。我正在运行最新版本的 CCNet (1.6.7258.1),并且在我的 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> 

每当我尝试运行此配置时,CCNet 服务器就会崩溃,但输出如下:

[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.Defa­ultErrorProcesser.ProcessError(String message)
         at ThoughtWorks.CruiseControl.Core.Config.NetReflectorConfigurationReader.<>c_­_DisplayClass1.<Read>b__0(InvalidNodeEventArgs args) 
         at Exortech.NetReflector.InvalidNodeEventHandler.Invoke(InvalidNodeEventArgsar­gs) 
         at Exortech.NetReflector.NetReflectorTypeTable.OnInvalidNode(InvalidNodeEventA­rgs args) 
         at Exortech.NetReflector.XmlTypeSerialiser.HandleUnusedNode(NetReflectorTypeTa­ble table, XmlNode orphan) 
         at Exortech.NetReflector.XmlTypeSerialiser.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.Hand­leConfigurationFileChanged(Object source, FileSystemEventArgs args) 
      ---------- 

有人可以帮忙吗?我不知道我在这里做错了什么,或者这是一个错误:(我几天前也在 ccnet-user 组上发帖,但没有收到任何回复 :(

4

1 回答 1

3

我现在收到了来自 ccnet-user 组的回复。条件块实际上是一种任务类型,因此需要位于任务或发布者元素中。

于 2010-05-05T02:01:33.267 回答