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

withMaven fail to set maven path when global variable is set

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • pipeline-maven-plugin
    • None
    • Jenkins ver. 2.107.3

      If there's a global variable defining a path to maven/bin. Pipeline integration fails to setup the requested maven tool.

       

      *Steps to Reproduce*

      1.  Install two maven versions, say 3.5.3 and 3.5.4

       

      2. Define a global variable PATH+MAVEN=/path/to/maven/3.5.3/bin

       

      3. Create a pipeline that uses withMaven step selecting maven 3.5.4

      Run sh "mvn --version"

      We expect it to show selected version 3.5.4 but it will show 3.5.3

       

       

          [JENKINS-53951] withMaven fail to set maven path when global variable is set

          Bernardo Vale created issue -
          Bernardo Vale made changes -
          Description Original: If there's a global variable defining a path to maven. Pipeline integration fails to setup the request maven tool.

           

          **Steps to Reproduce**

          1.  Install two maven versions, say 3.5.3 and 3.5.4

           

          2. Define a global variable MAVEN+PATH=/path/to/maven/3.5.3

           

          3. Create a pipeline that uses withMaven step selecting maven 3.5.4

          Run sh "mvn --version"

          We expect it to show selected version 3.5.4 but it will show 3.5.3

           

           
          New: If there's a global variable defining a path to maven/bin. Pipeline integration fails to setup the requested maven tool.

           

          **Steps to Reproduce**

          1.  Install two maven versions, say 3.5.3 and 3.5.4

           

          2. Define a global variable PATH+MAVEN=/path/to/maven/3.5.3/bin

           

          3. Create a pipeline that uses withMaven step selecting maven 3.5.4

          Run sh "mvn --version"

          We expect it to show selected version 3.5.4 but it will show 3.5.3

           

           
          Cyrille Le Clerc made changes -
          Assignee Original: Alvaro Lobato [ alobato ] New: Cyrille Le Clerc [ cleclerc ]
          Bernardo Vale made changes -
          Attachment New: withmaven.txt [ 44738 ]
          Arnaud Héritier made changes -
          Assignee Original: Cyrille Le Clerc [ cleclerc ]

            Unassigned Unassigned
            bvale Bernardo Vale
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: