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:
[ERROR] Error executing Maven. [ERROR] The specified user settings file does not exist: e:\cc-build\checkout\aws\dctl\branchespackageFspring-boot\workspace@tmp\withMaven22e2d518\settings.xml
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:
{quote} I get this error: {quote}[ERROR] Error executing Maven. [ERROR] The specified user settings file does not exist: e C:\cc-buildjenkins\checkout\aws\dctl\branchespackageFspring-boot\workspace@tmp\withMaven22e2d518\settings.xml {quote} 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 the second argument to the script that is invoked)
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: {quote}stage('Package') { steps { withMaven() {
bat "set MAVEN&mvn ${env.MAVEN_VERBOSE} clean package ${env.RELEASE_VERSION_PARAMETERS}"
}
} } {quote} I get this error:
{quote}[ERROR] Error executing Maven. [ERROR] The specified user settings file does not exist: C:\jenkins\dctl\branchespackageFspring-boot\workspace@tmp\withMaven22e2d518\settings.xml
{quote} 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 the second argument to the script that is invoked)
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: {quote}stage('Package') { steps { withMaven() {
bat "mvn ${env.MAVEN_VERBOSE} clean package ${env.RELEASE_VERSION_PARAMETERS}"
}
} } {quote} I get this error: {quote}[ERROR] Error executing Maven. [ERROR] The specified user settings file does not exist: C:\jenkins\dctl\branchespackageFspring-boot\workspace@tmp\withMaven22e2d518\settings.xml {quote} 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 the second argument to the script that is invoked)
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: {quote}stage('Package') { steps { withMaven() {
Unknown macro: \{ bat "mvn clean package" }
} } {quote} I get this error: {quote}[ERROR] Error executing Maven. [ERROR] The specified user settings file does not exist: C:\jenkins\dctl\branchespackageFspring-boot\workspace@tmp\withMaven22e2d518\settings.xml {quote}
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 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:
I get this error: {quote}[ERROR] Error executing Maven. [ERROR] The specified user settings file does not exist: C:\jenkins\dctl\branchespackageFspring-boot\workspace@tmp\withMaven22e2d518\settings.xml {quote} 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)
Dominik Bartholdi I can help troubleshoot this if you want. I have a question. How does config file plugin provide the maven command line option (-s for settings file) to the maven command?
I suspect that the problem may be in the pipeline-maven-plugin where in windows the % is not properly escaped when invoking the maven command.
Mario Jauvin could you please enable the Jenkins logs on the logger "org.jenkinsci.plugins.pipeline.maven.WithMavenStepExecution2" to "FINER" and re run the build please? Troubleshooting message will be added in the console of your build.
[~marioja] could you please enable the Jenkins logs on the logger "org.jenkinsci.plugins.pipeline.maven.WithMavenStepExecution2" to "FINER" and re run the build please?
Troubleshooting message will be added in the console of your build.
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:
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:
From what I understand the code, the method setupMaven which defines and overrides the MAVEN_CONFIG environment variable is not Windows specific so that making the change in that method would require knowing the platform.