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

Ant properties escaping incorrectly when passing json data structure

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • ant-plugin
    • None
    • Hudson v 1.549, ant 1.8.3, Windows 7

      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

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

              Created:
              Updated: