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?
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With