From f1baf6cbc91e6ec6b28bed93272ff6a874c5fcf7 Mon Sep 17 00:00:00 2001 From: Isaac Parenteau Date: Fri, 22 May 2020 19:35:27 +0100 Subject: [PATCH] Fixed jenkins issue --- Jenkinsfile | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 3467d80..31db53b 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -108,17 +108,18 @@ def getSha1() { } def mvn(args) { - // add node and maven tools to path before calling maven - def mvnHome = tool name: 'maven-3.6.1' - env.PATH = "${mvnHome}/bin:${env.PATH}" - sh "mvn ${args}" + withMaven( + maven: 'maven-3.6.1', + mavenSettingsConfig: 'locusworks-settings' + ) { + + sh "mvn ${args}" + + } } def mvn_initial(args) { - // add node and maven tools to path before calling maven - def mvnHome = tool name: 'maven-3.6.1' - env.PATH = "${mvnHome}/bin:${env.PATH}" - sh "mvn ${args}" + mvn(args) } def set_result(status) {