Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-21651

Ant properties escaping incorrectly when passing json data structure

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Component/s: ant-plugin
    • Labels:
      None
    • Environment:
      Hudson v 1.549, ant 1.8.3, Windows 7
    • Similar Issues:

      Description

      Using Tests Selector plugin to generate a list of test as properties to pass into ant. Hudson/ant quote the arguments incorrect. It put double quotes on the json key/value.

      Tried the same test on mac (running hudson on mac), the escaping work correctly.

      below....

      $ cmd.exe /C '"ant.bat -file build.xml "-DSYS=[

      {""enabled"":true,""owner"":""shushu"",""testgroup"":""A"",""testcase"":""single"",""multiplicity"":1}

      ,

      {""enabled"":false,""owner"":""shushu"",""testgroup"":""B"",""setuptype"":""basic"",""testcase"":""triple"",""multiplicity"":1}

      ]" testManual && exit %%ERRORLEVEL%%"'
      Buildfile: D:\Jenkins\workspace\SYS-02-ManualBuild\SYS\build.xml

      I echo out the "SYS" property and it contain the following value

      [echo] [

      {"enabled:true,owner:shushu,testgroup:A,testcase:single,multiplicity:1}

      ,

      {enabled:false,owner:shushu,testgroup:B,setuptype:basic,testcase:triple,multiplicity:1}

      ] testManual

        Attachments

          Activity

          There are no comments yet on this issue.

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            samw2k00 Sam Wei
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: