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

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: copyartifact-plugin
    • Labels:
      None
    • Environment:
      Windows
      Ant 1.8.1
      Hudson 1.379
      Copy Artifact Plugin 1.9
      Windows XP
    • Similar Issues:

      Description

      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).

        Attachments

          Activity

          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in hudson
          User: : mindless
          Path:
          trunk/hudson/plugins/copyartifact/src/main/java/hudson/plugins/copyartifact/BuildSelectorParameter.java
          http://jenkins-ci.org/commit/35569
          Log:
          [FIXED JENKINS-7680] strip newlines in xml, as they interfere with command line
          execution when params are passed to ant

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in hudson User: : mindless Path: trunk/hudson/plugins/copyartifact/src/main/java/hudson/plugins/copyartifact/BuildSelectorParameter.java http://jenkins-ci.org/commit/35569 Log: [FIXED JENKINS-7680] strip newlines in xml, as they interfere with command line execution when params are passed to ant
          Hide
          dmeibusch dmeibusch added a comment -

          I really appreciate the quick turnaround on this issue.
          Excuse my ignorance, is there a simple mechanism to get a build of the plugin with this revision? Or should I just wait for the next release of the plugin?

          Show
          dmeibusch dmeibusch added a comment - I really appreciate the quick turnaround on this issue. Excuse my ignorance, is there a simple mechanism to get a build of the plugin with this revision? Or should I just wait for the next release of the plugin?
          Hide
          mindless Alan Harder added a comment -
          Show
          mindless Alan Harder added a comment - you can get a dev build from http://ci.hudson-labs.org/view/Plugins/job/plugins_copyartifact/

            People

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

              Dates

              • Created:
                Updated:
                Resolved: