我最近开始了一个项目,目前正在尝试配置 ccnet.config
文件。
事实是我不知道为什么 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
文件位于“源目录”。我正在搜索,但找不到任何关于此的信息。另外,如您所见,我正在使用
nant
和 svn
。 最佳答案
您在发布者块中缺少 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>
关于svn - 无法在 CCNET 上找到项目的 Log Publisher,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/5008452/