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

XMLWordPrintable

      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)

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

              Created:
              Updated:
              Resolved: