CruiseControl - PHP lint check works via ANT but not through CruiseControl
Asked Answered
T

1

6

So I am writing an ant buildfile which will be used within cruisecontrol and ran into a weird issue. I've Googled the problem but haven't come across any concrete solutions, so I figured I would post the question here.

I have the following ant task:

<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>

And when I run it using:

ant -buildfile /path/to/my/elite/buildfiles/project/elite/build.xml module.lint

It runs fine, but when I attempt to build the project through CruiseControl GUI, I get the following errors:

[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

Not sure why I am getting the "characters ... not part of the command" errors, although it does look like the lint check did actually execute.

What do I need to do to fix the "characters ... not part of the command" errors?

Twoup answered 9/8, 2012 at 23:5 Comment(0)
T
2

Those messages indicate Ant is running in verbose or debug mode when the build is run from CruiseControl. (Try running from the command line with the -v option to see for yourself.)

Check your CC config for the build - see whether usedebug or similar is being set. Alternatively, some sort of custom logging may be used that logs at debug level.

Tello answered 14/9, 2012 at 5:53 Comment(3)
I'll check it out and report back. But even if I toggle the verbosity, why would cruise control be reporting the errors if the contents of the build file are correctly constructed?Twoup
Going to mark this as accepted answer. I haven't had time to check the cruise control code to see if it's running in "debug" mode, but even if it is, it still doesn't make sense why the errors are being thrown if the buildfile is properly formatted.Twoup
Those are not errors, just part of the way Ant logs apply/exec commands in verbose mode.Tello

© 2022 - 2024 — McMap. All rights reserved.