2011-02-15 62 views
4

我最近啓動了一個項目,目前正在嘗試配置ccnet.config文件。無法在CCNET上找到項目的日誌發佈者

事實是我找不到爲什麼CruiseControl無法找到日誌文件。

我想這很容易,我做錯了,4天后,我能找到解決方案。

我在CCNET得到一個錯誤信息:

ThoughtWorks.CruiseControl.Remote.CommunicationsException: Request processing has failed on the remote server: Unable to find Log Publisher for project so can't find log file at 
ThoughtWorks.CruiseControl.Remote.CruiseServerClient.ValidateResponse(Response response) at 
ThoughtWorks.CruiseControl.Remote.CruiseServerClient.GetMostRecentBuildNames(String projectName, Int32 buildCount) at 
ThoughtWorks.CruiseControl.WebDashboard.ServerConnection.ServerAggregatingCruiseManagerWrapper.GetMostRecentBuildSpecifiers(IProjectSpecifier projectSpecifier, Int32 buildCount, String sessionToken) at ThoughtWorks.CruiseControl.WebDashboard.Plugins.ProjectReport.ProjectReportProjectPlugin.Execute(ICruiseRequest cruiseRequest) at ThoughtWorks.CruiseControl.WebDashboard.MVC.Cruise.ServerCheckingProxyAction.Execute(ICruiseRequest cruiseRequest) at ThoughtWorks.CruiseControl.WebDashboard.MVC.Cruise.ProjectCheckingProxyAction.Execute(ICruiseRequest cruiseRequest) at 
ThoughtWorks.CruiseControl.WebDashboard.MVC.Cruise.CruiseActionProxyAction.Execute(IRequest request) at 
ThoughtWorks.CruiseControl.WebDashboard.MVC.Cruise.ExceptionCatchingActionProxy.Execute(IRequest request) 

正如我告訴你,我猜有什麼地方錯了我的配置文件,一個是如下:

<cruisecontrol> 
    <project name="Myproject" queue="MyprojectQueue" queuePriority="1"> 
    <webURL>http://localhost:80/ccnet/</webURL> 
    <workingDirectory>C:\Projects\Myproject\trunk\Source\</workingDirectory> 
    <artifactDirectory>C:\Projects\Myproject\trunk\Build\Log\</artifactDirectory> 
    <sourcecontrol type="svn"> 
     <trunkUrl>https://localhost/svn/Myproject.com/trunk</trunkUrl> 
     <workingDirectory>E:\Repositories\Myproject.com</workingDirectory> 
     <executable>C:\Program Files\VisualSVN Server\bin\svn.exe</executable> 
     <username>myusername</username> 
     <password>mypassword</password> 
     <timeout>60000</timeout> 
    </sourcecontrol> 
    <tasks> 
     <artifactcleanup cleanUpMethod="KeepLastXBuilds" cleanUpValue="5" /> 
     <modificationWriter> 
     <filename>mods.xml</filename> 
     <path></path> 
     </modificationWriter> 
    </tasks> 
    <triggers> 
     <intervalTrigger name="SVN" seconds="10" buildCondition="IfModificationExists" /> 
    </triggers> 
    <labeller type="defaultlabeller">  
     <prefix>0.1.</prefix> 
     <incrementOnFailure>true</incrementOnFailure> 
     <labelFormat>000</labelFormat> 
    </labeller> 
    <state type="state" directory="State" /> 

    <tasks> 
     <nant> 
     <executable>C:\Projects\Myproject\trunk\Binaries\NAnt\bin\nant.exe</executable> 
     <baseDirectory>C:\Projects\Myproject\trunk\Binaries\NAnt\</baseDirectory> 
     <buildArgs>-D:svn.executable="C:\Program Files\VisualSVN Server\bin\svn.exe"</buildArgs> 
     <nologo>false</nologo> 
     <buildFile>C:\Projects\Myproject\trunk\Source\Myproject.build</buildFile> 
     <logger>SourceForge.NAnt.XmlLogger</logger> 
     <buildTimeoutSeconds>1200</buildTimeoutSeconds> 
     <targetList> 
      <target>cruise</target> 
     </targetList> 
     </nant> 
    </tasks> 

    <publishers> 
     <buildpublisher> 
     <sourceDir>C:\Projects\Myproject\trunk\Build</sourceDir> 
     <publishDir>C:\Projects\Myproject\trunk\Build</publishDir> 
     <useLabelSubDirectory>true</useLabelSubDirectory> 
     </buildpublisher> 
     <merge> 
     <files> 
      <file>reports\devenv.log</file> 
      <file>reports\*-nunit.xml</file> 
      <file>reports\*-Coverage.xml</file> 
     </files> 
     </merge> 
    </publishers> 
    </project> 
</cruisecontrol> 

.sln文件位於「源目錄」。

我正在尋找,但找不到任何關於此。正如你所看到的,我正在使用nantsvn

+0

您正在使用什麼版本的CCNET的? – 2011-02-16 19:24:39

回答

4

您缺少發佈者模塊中的XML日誌發佈者。正如它在文檔中所述(.../CruiseControl.NET/webdashboard/doc/CCNET/Xml Log Publisher.html,聯機文檔似乎目前處於關閉狀態),儀表板正常運行需要它。發佈商模塊默認包含它,因此您只需在發佈商模塊中包含項目時添加它即可。

嘗試修改您的發佈封鎖如下,它應該幫助:

<publishers> 
    <buildpublisher> 
    <sourceDir>C:\Projects\Myproject\trunk\Build</sourceDir> 
    <publishDir>C:\Projects\Myproject\trunk\Build</publishDir> 
    <useLabelSubDirectory>true</useLabelSubDirectory> 
    </buildpublisher> 
    <merge> 
    <files> 
     <file>reports\devenv.log</file> 
     <file>reports\*-nunit.xml</file> 
     <file>reports\*-Coverage.xml</file> 
    </files> 
    </merge> 
    <xmllogger /> 
</publishers> 
+0

謝謝達米爾,我實際上開發我的網站開心,沒有痛苦。我發現了很多信息,但對於可以用ccnet進行實驗的麻煩並沒有真正的確切信息。所以,最後我發現讓它工作的唯一方法是花費幾個小時來搞定系統,每次進行更改時重新啓動池等等。 – Joseph 2011-02-27 10:18:47

相關問題