Details
-
Type:
Bug
-
Status: Closed (View Workflow)
-
Priority:
Major
-
Resolution: Fixed
-
Component/s: config-file-provider-plugin, pipeline-maven-plugin
-
Labels:
-
Environment:Confile File Provider ver 3.6
Jenkins ver 2.164.2
Windows 10
-
Similar Issues:
Description
I configured a maven settings and global settings file in the Pipeline Maven Configuration of the folder containing the multibranch pipeline job. When I run the following stage from my Jenkins file:
stage('Package') { steps { withMaven() { bat "mvn clean package" } } }
I get this error:
[ERROR] Error executing Maven. [ERROR] The specified user settings file does not exist: C:\jenkins\dctl\branchespackageFspring-boot\workspace@tmp\withMaven22e2d518\settings.xml
The reason I get this error is that the folder containing the branch is called branches%2Fspring-boot and the config file provider is replacing %2 with package (I assume this is because package is the second argument to the script that is invoked)
I did and the problem is that when the with maven wrapper script is created, the pathnames contain %2F which when invoked inside the wrapper scripts get evaluated as arguments. Here is the log output from WithMavenStepExecution2:
when calling maven in that manner, it will not work. The generated wrapper script should double the % signs in each path argument. For example:
I tested modifying the withMaven wrapper script manually and it works.