我在发布当前项目状态时遇到问题。
映射:
<publishers>
<xmllogger /><!-- Log For WebDashboard ##Do not remove##-->
<email>
...
</email>
<onfailure>
<exec>
<executable>echo ERROR > logs/status.txt</executable>
</exec>
</onfailure>
</publishers>当我想要启动我的服务时,我会收到以下消息:
ThoughtWorks.CruiseControl.Core.Config.ConfigurationException:无法从配置文档实例化CruiseControl项目。配置文档可能缺少正确填充CruiseControl配置所需的Xml节点。无法加载数组项'onfailure‘-无法将值为"echo ERROR >logs/ ThoughtWorks.CruiseControl.Core.ITask .txt“的对象从类型System.String转换为状态。
有人知道这条信息是什么意思吗?
期待中的感谢
亚历克斯
发布于 2010-12-20 17:23:02
您使用的是CruiseControl还是CruiseControl.NET?
如果为CC.NET,则"onfailure“节点不存在。相反,您应该像这样使用条件Publisher1:
<conditionalPublisher>
<conditions>
<condition>Failure</condition>
</conditions>
<publishers>
<exec>
<executable>echo ERROR > logs/status.txt</executable>
</exec>
</publishers>
</conditionalPublisher>您可能还需要将echo任务封装在cmd调用中:
<exec>
<executable>cmd.exe</executable>
<buildArgs>/c "echo ERROR > logs\status.txt"</buildArgs>
</exec>1
发布于 2010-12-20 17:23:03
从documentation看起来,<executable>必须是可执行文件的名称,并且参数必须在<buildArgs>中传递。因此,像这样的东西可能会起到作用。
<exec>
<executable>echo</executable>
<buildArgs>ERROR > logs/status.txt</buildArgs>
</exec>https://stackoverflow.com/questions/4488157
复制相似问题