[
https://issues.jenkins-ci.org/browse/JENKINS-13412?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=163228#comment-163228
]
Daniel Beck edited comment on JENKINS-13412 at 5/28/12 7:49 AM:
----------------------------------------------------------------
Nothing in the job configuration. Those are job arguments with the following
values, one per line:
{code}
<foo/>
foo bar
<foo> <bar> </foo>
{code}
The first and second are handled properly, but the third, containing both
spaces and XML brackets is quoted twice. That might be the cause of the problem.
I cannot reproduce it on my Windows system without Jenkins etc. right now, I'll
let you know what I find out.
To reproduce my production problem, use Copy Artifacts plugin and a Build
Selector job parameter that is set to "Specific Build". Then the XML value
produced isn't handled properly by the Gradle program call.
was (Author: danielbeck):
Nothing in the job configuration. Those are job arguments with the
following values, one per line:
{code}
<foo/>
foo bar
<foo> <bar> </foo>
{code}
The first and second are handled properly, but the third, containing both
spaces and XML brackets is quoted twice, resulting in an error.
I cannot reproduce it on my Windows system right now, I'll let you know what I
find out.
To reproduce my production problem, use Copy Artifacts plugin and a Build
Selector job parameter that is set to "Specific Build". Then the XML value
produced isn't handled properly by the Gradle program call.
> Gradle plugin fails to quote parameters without whitespace when containing
> input/output redirection symbols, e.g. in XML strings
> --------------------------------------------------------------------------------------------------------------------------------
>
> Key: JENKINS-13412
> URL: https://issues.jenkins-ci.org/browse/JENKINS-13412
> Project: Jenkins
> Issue Type: Bug
> Components: gradle
> Affects Versions: current
> Environment: Windows Server 2008 R2
> Jenkins 1.424.6
> Jenkins Gradle Plugin 1.12
> Reporter: Daniel Beck
> Assignee: Gregory Boissinot
>
> Gradle plugin explicitly passes job parameters to the "cmd.exe /c gradle.bat"
> call.
> If one of these arguments looks like XML, but does not contain whitespace, it
> is not quoted. This leads to problems with input/output redirection symbols
> (less-than, greater-than)
> Example String Parameter value:
> {code}
> <fail>
> {code}
> Results in the following build output:
> {code}
> [workspace] $ cmd.exe /C C:\path\to\gradle.bat -Dfoo=<fail> -i && exit
> %%ERRORLEVEL%%
> The system cannot find the file specified.
> Build step 'Invoke Gradle script' changed build result to FAILURE
> Build step 'Invoke Gradle script' marked build as failure
> Notifying upstream projects of job completion
> {code}
> Real world example:
> Copy artifacts plugin's "Latest successful build" has the value:
> {code}
> <StatusBuildSelector/>
> {code}
> This results in "File not found" errors on Windows Server. Not tested on
> Linux.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.jenkins-ci.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira