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

Path problems when using sh of git for windows

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Having a windows build node using sh.exe in the path from git for windows withMaven has problems with mavenSettingsFilePath and mavenLocalRepo because Backslashes are not escaped.

      C:\foo\bar must be C:\\foo
      bar

      withMaven(mavenSettingsFilePath: env.WORKSPACE + "\\foo
      bar")

      This works when using bat mvn instead of sh mvn inside the withMaven block.

        Attachments

          Issue Links

            Activity

            Hide
            cleclerc Cyrille Le Clerc added a comment - - edited

            Michael Düsterhus we are aware that the withMaven plugin does not work well with Cygwin style "sh" call on Windows. Contributions are welcome, I don't work on Windows so it is very hard for me to work on this kind of feature.

            Show
            cleclerc Cyrille Le Clerc added a comment - - edited Michael Düsterhus we are aware that the withMaven plugin does not work well with Cygwin style "sh" call on Windows. Contributions are welcome, I don't work on Windows so it is very hard for me to work on this kind of feature.
            Hide
            reitzmichnicht Michael Düsterhus added a comment -

            As mentioned in the duplicate issue, "does not work well" is more like does not work at all.

            Any hints where in the code I should take a look to fix this issue?

            Show
            reitzmichnicht Michael Düsterhus added a comment - As mentioned in the duplicate issue, "does not work well" is more like does not work at all. Any hints where in the code I should take a look to fix this issue?
            Show
            cleclerc Cyrille Le Clerc added a comment - Thanks Michael Düsterhus for the proposal. The code is located in WithMavenStepExecution.java https://github.com/jenkinsci/pipeline-maven-plugin/blob/pipeline-maven-3.5.9/jenkins-plugin/src/main/java/org/jenkinsci/plugins/pipeline/maven/WithMavenStepExecution.java

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              reitzmichnicht Michael Düsterhus
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated: