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

Copy Artifact's Build Selector parameter has unescaped newlines (breaks Ant functionality on Windows)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • copyartifact-plugin
    • None
    • Windows
      Ant 1.8.1
      Hudson 1.379
      Copy Artifact Plugin 1.9
      Windows XP

      This issue looks to be closely related to JENKINS-7108.

      [package] $ cmd.exe /C '"C:\hudson\tools\Ant_1.8.1\apache-ant-1.8.1\bin\ant.bat "-DCONFIG_BUILD_SELECTOR=<StatusBuildSelector>
      <stable>true^</stable^>
      </StatusBuildSelector>" "-DPLATFORM_BUILD_SELECTOR=<StatusBuildSelector>
      <stable>true^</stable^>
      </StatusBuildSelector>" "-DIDE_BUILD_SELECTOR=<StatusBuildSelector>
      <stable>true^</stable^>
      </StatusBuildSelector>" clean && exit %%ERRORLEVEL%%"'
      The syntax of the command is incorrect.

      I believe you need to use the caret (^) to escape the newlines as well in the cmd.exe command line. (Hence, and ant/hudson core component fix?)

      Alternative fix, the BUILD_SELECTOR values could remove newlines from the XML (I assume they are just for prettiness).

            mindless Alan Harder
            dmeibusch dmeibusch
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: