XMLWordPrintable

      Rather than

      withEnv(["PATH=${tool 'Maven 3.2.2'}/bin:${env.PATH}"]) {sh 'mvn package'}
      

      you should be able to say

      withTool('Maven 3.2.2') {sh 'mvn package'}
      

      where this code builds the environment variables within the block.

            jglick Jesse Glick
            jglick Jesse Glick
            Votes:
            8 Vote for this issue
            Watchers:
            17 Start watching this issue

              Created:
              Updated: