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

Error running maven with settings file when running multibranch pipeline with a slash in the branch

      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)

          [JENKINS-57324] Error running maven with settings file when running multibranch pipeline with a slash in the branch

          Mario Jauvin created issue -
          Mario Jauvin made changes -
          Description Original: 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: e:\cc-build\checkout\aws\dctl\branchespackageFspring-boot\workspace@tmp\withMaven22e2d518\settings.xml
          {quote}
          New: 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)
          Mario Jauvin made changes -
          Labels New: windows
          Mario Jauvin made changes -
          Description Original: 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)
          New: 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)

          can you please explain what are the values of ${env.MAVEN_VERBOSE} and ${env.RELEASE_VERSION_PARAMETERS}?

          Dominik Bartholdi added a comment - can you please explain what are the values of ${env.MAVEN_VERBOSE} and ${env.RELEASE_VERSION_PARAMETERS}?

          Mario Jauvin added a comment - - edited

          For all intents and purpose you can ignore them. I removed them as they are not important to reproducing the problem.

          Mario Jauvin added a comment - - edited For all intents and purpose you can ignore them. I removed them as they are not important to reproducing the problem.
          Mario Jauvin made changes -
          Description Original: 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)
          New: 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 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 the second argument to the script that is invoked)
          Mario Jauvin made changes -
          Description Original: 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 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 the second argument to the script that is invoked)
          New: 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)
          Mario Jauvin made changes -
          Description Original: 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)
          New: 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:
          {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)
          Mario Jauvin made changes -
          Description Original: 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:
          {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)
          New: 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:

          {noformat}
          stage('Package') {
           steps {
            withMaven() {
             bat "mvn clean package"
            }
           }
          }

          {noformat}

          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)

            cleclerc Cyrille Le Clerc
            marioja Mario Jauvin
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: