我安装了CruiseControl 2.8.3,svn, 并使用config.xml:
<?xml version="1.0" encoding="UTF-8"?>
<cruisecontrol>
<project name="xxxx">
<property name="maven_home" value="F:/xxx/df/apache-maven-2.2.1"/>
<listeners>
<currentbuildstatuslistener file="logs/${project.name}/status.txt" />
</listeners>
<bootstrappers>
<svnbootstrapper localWorkingCopy="projects/${project.name}" />
</bootstrappers>
<modificationset quietperiod="30">
<svn localWorkingCopy="projects/${project.name}" />
</modificationset>
<schedule interval="60">
<maven2 mvnhome="${maven_home}" pomfile="projects/${project.name}/pom.xml"
goal="clean test" />
</schedule>
<log>
<merge dir="projects/${project.name}/target/surefire-reports" />
</log>
<publishers>
<onsuccess>
<artifactspublisher dest="artifacts/${project.name}"
file="projects/${project.name}/target/${project.name}.jar" />
</onsuccess>
</publishers>
</project>
</cruisecontrol>
当我在命令中运行cruisecontrol.bat时一切正常。 但我运行cc作为NT服务给我错误:
Caused by: java.io.IOException: Cannot run program "svn" (in directory "projects/xxxx"): CreateProcess error=2, ?????????
答案 0 :(得分:1)
最有可能的是,您的SVN位于一个目录中,该目录包含在Windows用户帐户的PATH环境变量中,但不包含在运行CC服务的用户帐户的PATH中。尝试使用SVN.EXE的完整路径或将SVN.EXE位置添加到计算机范围的PATH。
答案 1 :(得分:0)
您可以在CruiseControl的sourcecontrol块中设置Subversion .exe路径:
<sourcecontrol type="svn">
<executable>C:\Program Files\svn\bin\svn.exe</executable>
etc...
</sourcecontrol>