Ant properties escaping incorrectly when passing json data structure

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      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

            Assignee:
            Unassigned
            Reporter:
            Sam Wei
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Archived: