jenkinsci / jenkinsci/durable-task-plugin

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

Open
#391 0 comments 0 reactions 0 assignees View on GitHub
component:durable-task-plugin imported-jira-issue priority:major resolution:unresolved
Dominant language
Java
Stars
30
Forks
101
PR merge metrics
No merged PRs in 30d

Description

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]

---
Originally reported by bokc, imported from: Slashes in branch names cause 'bat' task error


  • status: Open
  • priority: Major
  • component(s): durable-task-plugin
  • label(s): triaged-2018-11, windows
  • resolution: Unresolved
  • votes: 0
  • watchers: 2
  • imported: 2025-12-09

Raw content of original issue

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]

environment

```
Jenkins 2.68

Durable-task-plugin : 1.14
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.