我已经成功地将IDE中的编译日志提取到了一个xml文件中。因此,为了合并它,我在publisher任务中的ccnet.config文件中提到了使用<merge>部分。
但是,当我强制构建时,我能够正确地获得output.xml文件,但是在ccnet.config窗口中抛出了一个错误,它无法合并,因为其他进程目前正在使用该文件。请见下文:
VSAT:ERROR Publisher抛出异常: ThoughtWorks.CruiseControl.Core.CruiseC ontrolException:无法读取文件的内容: C:\ThreePartition ut.xml --> System.IO.IOException:进程无法访问文件'C:\ThreeP artition\output.xml‘,因为它正在被其他进程使用。
你能建议什么方法可以成功地完成合并吗?下面我已经粘贴了整个ccnet.config文件。
<project name="VSAT">
<sourcecontrol type="filtered">
<sourceControlProvider type="filesystem">
<repositoryRoot>C:\ThreePartition</repositoryRoot>
<autoGetSource>true</autoGetSource>
<ignoreMissingRoot>false</ignoreMissingRoot>
</sourceControlProvider>
<exclusionFilters>
<pathFilter>
<pattern>C:\ThreePartition\wrSbc750gx_ThreePartition\**</pattern>
</pathFilter>
<pathFilter>
<pattern>C:\ThreePartition\*.txt</pattern>
</pathFilter>
<pathFilter>
<pattern>C:\ThreePartition\*.xml</pattern>
</pathFilter>
</exclusionFilters>
</sourcecontrol>
<triggers>
<intervalTrigger name="continuous" seconds="240"
buildCondition="IfModificationExists" />
</triggers>
<tasks>
<nant>
<executable>C:\Nant-0.85\bin\NAnt.exe</executable>
<buildFile>nant.build</buildFile>
</nant>
</tasks>
<publishers>
<merge>
<files>
<file>C:\ThreePartition\output.xml</file>
</files>
</merge>
<xmllogger logDir="C:\Program Files\CruiseControl.NET\server\DF2.0-CI
\Logfiles" />
<email from="BuildAdmin@server.com"
mailhost="smtp.servermail.com" includeDetails="TRUE">
<users>
user name="Maddy" group="buildmaster"
address="Mymail@server.com"/>
</users>
<groups>
<group name="buildmaster" notification="always"/>
<group name="developers" notification="change"/>
</groups>
</email>
</publishers>
</project>
</cruisecontrol>我刚刚把出版商一节放在下面,以便看得更清楚。
<publishers>
<merge>
<files>
<file>C:\ThreePartition\output.xml</file>
</files>
</merge>
<email from="BuildAdmin@server.com" mailhost="smtp.server.com" includeDetails="TRUE">
<users>
<user name="Maddy" group="buildmaster" address="Maddy.@server.com"/>
</users>
<groups> <group name="buildmaster" notification="always"/>
<group name="developers" notification="change"/>
</groups>
</email>
发布于 2009-07-23 00:10:10
一些想法:
发布于 2013-01-29 11:23:34
问题是,在CC.net试图合并时,哪个进程打开了xml --也许可能有用?如果您将xml输出复制到一个单独的文件中并将其合并,它可能会工作。
https://stackoverflow.com/questions/768482
复制相似问题