Mik*_*ell 5 ant cruisecontrol lint phplint
所以我正在编写一个ant buildfile,它将在cruisecontrol中使用并遇到一个奇怪的问题.我用Google搜索了问题,但没有遇到任何具体的解决方案,所以我想我会在这里发布问题.
我有以下蚂蚁任务:
<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>
Run Code Online (Sandbox Code Playgroud)
当我使用以下方式运行它:
ant -buildfile /path/to/my/elite/buildfiles/project/elite/build.xml module.lint
Run Code Online (Sandbox Code Playgroud)
它运行正常,但当我尝试通过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
Run Code Online (Sandbox Code Playgroud)
不知道为什么我得到"字符...不是命令的一部分"错误,虽然它看起来像lint检查确实执行.
我需要做些什么来修复"字符......不是命令的一部分"错误?
这些消息表明当从 CruiseControl 运行构建时,Ant 正在详细或调试模式下运行。(尝试从命令行运行并选择-v
自己查看的选项。)
检查您的 CC 配置以进行构建 - 查看是否usedebug
已设置或类似的设置。或者,可以使用某种在调试级别记录的自定义日志记录。