我正在编写一个用于cruisecontrol的ant buildfile,但遇到了一个奇怪的问题。我已经通过Google搜索过这个问题,但并没有找到明确的解决方案,因此我想在这里发布问题。
我有以下的ant任务:
<target name="module.lint">
<apply executable="/usr/bin/php" failonerror="true">
<arg value="-l" />
<fileset dir="/path/to/my/elite/code" includes="**/*.php" />
</apply>
</target>
当我使用以下方式来运行它时:
ant -buildfile /path/to/my/elite/buildfiles/project/elite/build.xml module.lint
代码可以正常运行,但是当我尝试通过CruiseControl GUI构建项目时,出现了以下错误:
[cc]Aug-09 15:51:04 ScriptRunner - fileset: Setup scanner in dir /path/to/my/elite/code with patternSet{ includes: [**/*.php] excludes: [] }
[cc]Aug-09 15:51:04 ScriptRunner - [apply] Executing '/usr/bin/php' with arguments:
[cc]Aug-09 15:51:04 ScriptRunner - [apply] '-l'
[cc]Aug-09 15:51:04 ScriptRunner - [apply] '/path/to/my/elite/code/Script.php'
[cc]Aug-09 15:51:04 ScriptRunner - [apply]
[cc]Aug-09 15:51:04 ScriptRunner - [apply] The ' characters around the executable and arguments are
[cc]Aug-09 15:51:04 ScriptRunner - [apply] not part of the command.
[cc]Aug-09 15:51:04 ScriptRunner - Execute:Java13CommandLauncher: Executing '/usr/bin/php' with arguments:
[cc]Aug-09 15:51:04 ScriptRunner - '-l'
[cc]Aug-09 15:51:04 ScriptRunner - '/path/to/my/elite/code/Script.php'
[cc]Aug-09 15:51:04 ScriptRunner -
[cc]Aug-09 15:51:04 ScriptRunner - The ' characters around the executable and arguments are
[cc]Aug-09 15:51:04 ScriptRunner - not part of the command.
[cc]Aug-09 15:51:04 ScriptRunner - [apply] No syntax errors detected in /path/to/my/elite/code/Script.php
我不确定为什么会出现“characters ... not part of the command”错误,尽管它看起来像是lint检查确实已经执行。
我需要做什么来修复“characters ... not part of the command”错误?