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

Ant build steps with properties including variables are broken

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Blocker Blocker
    • ant-plugin
    • None
    • Hudson 1.376 on Windows 2003 Server with Tomcat 6.

      If Ant build steps take properties with an %, the next char is enclosed in quotes in a 'fancy' way:
      $ cmd.exe /C '"C:\ant\apache-ant-1.7.1\bin\ant.bat "-Dhudsonhome=%"H"UDSON_HOME%" && exit %%ERRORLEVEL%%"'
      The property should be "-Dhudsonhome=%HUDSON_HOME%"

      This worked with Hudson 1.365

          [JENKINS-7442] Ant build steps with properties including variables are broken

          skorsky created issue -

          jwhackettuk added a comment -

          I can confirm this. I've just updated from 376 and its broken %BUILD_ID% and %BUILD_NUMBER%
          ant runs as
          cmd.exe /C '"ant.bat -file build.xml "-DBUILD_ID=%"B"UILD_ID%" "-DBUILD_NUMBER=%"B"UILD_NUMBER%" release && exit %%ERRORLEVEL%%"'

          jwhackettuk added a comment - I can confirm this. I've just updated from 376 and its broken %BUILD_ID% and %BUILD_NUMBER% ant runs as cmd.exe /C '"ant.bat -file build.xml "-DBUILD_ID=%"B"UILD_ID%" "-DBUILD_NUMBER=%"B"UILD_NUMBER%" release && exit %%ERRORLEVEL%%"'

          xkill added a comment -

          I currently updated from 1.352 to 1.379 and can also confirm this issue.

          xkill added a comment - I currently updated from 1.352 to 1.379 and can also confirm this issue.

          Andrew Bayer added a comment -

          This is, I'm fairly sure, the same problem as JENKINS-7657 - I've assigned that to mindless, who did a number of changes to Ant argument handling a while back. I believe that his changes are the underlying cause here.

          Andrew Bayer added a comment - This is, I'm fairly sure, the same problem as JENKINS-7657 - I've assigned that to mindless, who did a number of changes to Ant argument handling a while back. I believe that his changes are the underlying cause here.
          Andrew Bayer made changes -
          Link New: This issue duplicates JENKINS-7657 [ JENKINS-7657 ]
          Andrew Bayer made changes -
          Resolution New: Duplicate [ 3 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]

          j_boyle added a comment -

          Since JENKINS-7442 best describes my symptoms (more so than JENKINS-7657), this seems to have been introduced with .368. I can build under .367, however the same project(s) updated to 368 I receive the same error/condition of "inserted quotes" as explained in jwhackettuk's comments. thank you.

          ant 1.7.1, jdk 1.6.0_18, running as service on win2003 server

          j_boyle added a comment - Since JENKINS-7442 best describes my symptoms (more so than JENKINS-7657 ), this seems to have been introduced with .368. I can build under .367, however the same project(s) updated to 368 I receive the same error/condition of "inserted quotes" as explained in jwhackettuk's comments. thank you. ant 1.7.1, jdk 1.6.0_18, running as service on win2003 server
          Alan Harder made changes -
          Link Original: This issue duplicates JENKINS-7657 [ JENKINS-7657 ]
          Alan Harder made changes -
          Link New: This issue is related to JENKINS-7657 [ JENKINS-7657 ]
          Alan Harder made changes -
          Link New: This issue is related to JENKINS-7108 [ JENKINS-7108 ]

            mindless Alan Harder
            skorsky skorsky
            Votes:
            3 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: