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

Slashes in branch names cause 'bat' task error

      On windows, when we use '/' on branch name, it was replaced by %2F on the workspace path. On 'bat' task, the %2 will be replace with the 3rd element of the command.

      Exemple :

      • Branch name : 'release/4.0.0'
      • JenkinsFile command : bat 'mvn integration-test sonar:sonar'
      • The workspace path :
        D:\Jenkins\Slave\workspace\Artemis\artemis-angular\artemis-model\release%2F4.0.0
      • The error :
      [ERROR] Could not create local repository at D:\Jenkins\Slave\workspace\Artemis\artemis-angular\artemis-model\releasesonar:sonarF4.0.0@2\.repository2 -> [Help 1]
      [ERROR]
      [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
      [ERROR] Re-run Maven using the -X switch to enable full debug logging.
      [ERROR] 
      [ERROR] For more information about the errors and possible solutions, please read the following articles:
      [ERROR] [Help 1] [http://cwiki.apache.org/confluence/display/MAVEN/LocalRepositoryNotAccessibleException]
      

          [JENKINS-45303] Slashes in branch names cause 'bat' task error

          bokc created issue -
          bokc made changes -
          Priority Original: Minor [ 4 ] New: Major [ 3 ]
          bokc made changes -
          Description Original: On windows, when we use '/' on branch name, it was replaced by %2F on the workspace path. On 'bat' task, the %2 will be replace with the 3rd element of the command.

          Exemple :
           * Branch name : 'release/4.0.0'
           * JenkinsFile command : bat 'mvn integration-test sonar:sonar'
           * The workspace path :

          D:\Jenkins\Slave\workspace\Artemis\artemis-angular\artemis-model\release%2F4.0.0 * The error :

          [ERROR] Could not create local repository at D:\Jenkins\Slave\workspace\Artemis\artemis-angular\artemis-model\releasesonar:sonarF4.0.0@2\.repository2 -> [Help 1][ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.[ERROR] Re-run Maven using the -X switch to enable full debug logging.[ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles:[ERROR] [Help 1] [http://cwiki.apache.org/confluence/display/MAVEN/LocalRepositoryNotAccessibleException]
          New: On windows, when we use '/' on branch name, it was replaced by %2F on the workspace path. On 'bat' task, the %2 will be replace with the 3rd element of the command.

          Exemple :
           * Branch name : 'release/4.0.0'
           * JenkinsFile command : bat 'mvn integration-test sonar:sonar'
           * The workspace path :
          D:\Jenkins\Slave\workspace\Artemis\artemis-angular\artemis-model\release%2F4.0.0

          * The error :

          {code:java}
          [ERROR] Could not create local repository at D:\Jenkins\Slave\workspace\Artemis\artemis-angular\artemis-model\releasesonar:sonarF4.0.0@2\.repository2 -> [Help 1]
          [ERROR]
          [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
          [ERROR] Re-run Maven using the -X switch to enable full debug logging.
          [ERROR]
          [ERROR] For more information about the errors and possible solutions, please read the following articles:
          [ERROR] [Help 1] [http://cwiki.apache.org/confluence/display/MAVEN/LocalRepositoryNotAccessibleException]
          {code}
          Vivek Pandey made changes -
          Labels Original: windows New: triaged-2018-11 windows

            Unassigned Unassigned
            bokc bokc
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: