diff --git a/Jenkinsfile b/Jenkinsfile index d56d6daef..36c5cf281 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -4,10 +4,14 @@ node { stage('Checkout') { git 'https://github.com/ThilakrajKM/spring-petclinic' } - - stage('Build') { - sh 'mvn clean package' - } + + stage('Build'){ + + def mvn_version = 'M3' + withEnv( ["PATH+MAVEN=${tool mvn_version}/bin"] ) { + sh "mvn clean package" + } + } stage('Archive') { junit allowEmptyResults: true, testResults: '**/target/**/TEST*.xml'