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

Ant properties are quoted incorrectly on Windows

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • core
    • None
    • Hudson 1.371
      Ant 1.7.1

      The latest Hudson seems to quote Ant properties incorrectly. Older versions of Hudson did not have the same problem. The quote problem makes it impossible to define an empty Ant property.

      Steps to reproduce:

      1. Create new free style job
      2. Run the job to create a workspace folder
      3. Add the following file to the job workspace:
        build.xml
        <project default="build" basedir=".">
            <target name="build">
                <echo message="Value: '${value}'" />
            </target>
        </project>
        
      4. Reconfigure the hudson job to invoke Ant
      5. In the Ant properties field write:
        value=""
        
      6. Run the job

      Excepted result:
      The Ant script should show that the value property was blank

      Actual result:
      The Ant script show that the value property is actual "".

      Additional information:
      In the console output of the job Hudson 1.371 displays:
      [workspace] $ cmd.exe /C '"ant.bat "-Dvalue=""""" && exit %%ERRORLEVEL%%"'

      In the console output of the job in older Hudson's (1.361 and earlier) displayed:
      [workspace] $ cmd.exe /C '"ant.bat -Dvalue="" build && exit %%ERRORLEVEL%%"'

          [JENKINS-7204] Ant properties are quoted incorrectly on Windows

          Anders Hansen created issue -
          Alan Harder made changes -
          Assignee Original: huybrechts [ huybrechts ]
          Summary Original: Ant properties are quoted incorrectly New: Ant properties are quoted incorrectly on Windows
          Alan Harder made changes -
          Link New: This issue is related to JENKINS-7108 [ JENKINS-7108 ]
          Anders Hansen made changes -
          Description Original: The latest Hudson seems to quote Ant properties incorrectly. Older versions of Hudson did not have the same problems. The quote problem makes it impossible to define an empty Ant property.

          Steps to reproduce:
          1)Create new free style job
          2)Run the job to create a workspace folder
          3)Add the following file to the job workspace:
          build.xml:
          <project default="build" basedir=".">
          <target name="build">
          <echo message="Value: '${value}'" />
          </target>
          </project>

          4)Reconfigure the hudson job to invoke Ant
          5)In the Ant properties field write:
          value=""
          6)Run the job

          Excepted result:
          The Ant script should show that the value property was blank

          Actual result:
          The Ant script show that the value property is actual "".

          Additional information:
          In the console output of the job Hudson 1.371 displays:
          [workspace] $ cmd.exe /C '"c:\apache-ant-1.7.1\bin\ant.bat "-Dvalue=""""" && exit %%ERRORLEVEL%%"'

          In the console output of the job in older Hudson's (1.361 and earlier) displaed:
          [workspace] $ cmd.exe /C '"ant.bat -Dvalue="" build && exit %%ERRORLEVEL%%"'
          New: The latest Hudson seems to quote Ant properties incorrectly. Older versions of Hudson did not have the same problem. The quote problem makes it impossible to define an empty Ant property.

          Steps to reproduce:
          # Create new free style job
          # Run the job to create a workspace folder
          # Add the following file to the job workspace:
          {code:title=build.xml}
          <project default="build" basedir=".">
              <target name="build">
                  <echo message="Value: '${value}'" />
              </target>
          </project>
          {code}
          # Reconfigure the hudson job to invoke Ant
          # In the Ant properties field write:
          {code:xml}
          value=""
          {code}
          # Run the job
          \\ \\

          Excepted result:
          The Ant script should show that the value property was blank

          Actual result:
          The Ant script show that the value property is actual "".

          Additional information:
          In the console output of the job Hudson 1.371 displays:
          [workspace] $ cmd.exe /C '"ant.bat "-Dvalue=""""" && exit %%ERRORLEVEL%%"'

          In the console output of the job in older Hudson's (1.361 and earlier) displayed:
          [workspace] $ cmd.exe /C '"ant.bat -Dvalue="" build && exit %%ERRORLEVEL%%"'
          Alan Harder made changes -
          Assignee New: Alan Harder [ mindless ]
          Andrew Bayer made changes -
          Link New: This issue is duplicated by JENKINS-5157 [ JENKINS-5157 ]
          Anders Hansen made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: Open [ 1 ] New: Closed [ 6 ]
          macosgrove made changes -
          Resolution Original: Fixed [ 1 ]
          Status Original: Closed [ 6 ] New: Reopened [ 4 ]
          Kirill Evstigneev made changes -
          Link New: This issue is related to JENKINS-2149 [ JENKINS-2149 ]
          Alan Harder made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: Reopened [ 4 ] New: Resolved [ 5 ]
          Anders Hansen made changes -
          Status Original: Resolved [ 5 ] New: Closed [ 6 ]

            mindless Alan Harder
            amh Anders Hansen
            Votes:
            4 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: