You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by ol...@apache.org on 2020/06/01 10:35:04 UTC

[maven] 17/29: do not use withMaven

This is an automated email from the ASF dual-hosted git repository.

olamy pushed a commit to branch it_runs
in repository https://gitbox.apache.org/repos/asf/maven.git

commit a4ea28a7dfd483b7cc3455d7123fdfe2edea65b0
Author: olivier lamy <ol...@apache.org>
AuthorDate: Mon Jun 1 16:18:32 2020 +1000

    do not use withMaven
    
    Signed-off-by: olivier lamy <ol...@apache.org>
---
 Jenkinsfile.its | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/Jenkinsfile.its b/Jenkinsfile.its
index b5abecf..3408c1e 100644
--- a/Jenkinsfile.its
+++ b/Jenkinsfile.its
@@ -8,8 +8,9 @@ pipeline {
   stages {
     stage("Build Maven Core") {
       steps {
-        withMaven(jdk: 'JDK 1.8 (latest)', maven: 'Maven 3.6.3',publisherStrategy: 'EXPLICIT'){
-          sh "mvn -V clean install -P versionlessMavenDist -Dmaven.repo.local=${env.WORKSPACE}/repo"
+        withEnv(["JAVA_HOME=${ tool "JDK 1.8 (latest)" }", "PATH+MAVEN=${tool 'Maven 3.6.3'}/bin:${env.JAVA_HOME}/bin"]) {
+            sh "mvn -V clean install -P versionlessMavenDist -Dmaven.repo.local=${env.WORKSPACE}/repo"
+          }
         }
 //        stash name: 'apache-maven-bin.zip', includes: 'apache-maven/target/apache-maven-bin.zip'
 //        stash name: 'wrapperDistroDir', includes: 'apache-maven/target/**'
@@ -23,9 +24,7 @@ pipeline {
 //        unstash name: 'wrapperDistroDir'
 //        unstash name: 'mavenWrapper'
         sh "ls -lrt"
-        withMaven(jdk: 'JDK 1.8 (latest)',
-                  maven: 'Maven 3.6.3',
-                  publisherStrategy: 'EXPLICIT'){
+        withEnv(["JAVA_HOME=${ tool "JDK 1.8 (latest)" }", "PATH+MAVEN=${tool 'Maven 3.6.3'}/bin:${env.JAVA_HOME}/bin"]) {
           sh "mvn clean test -Prun-its,embedded -Dmaven.test.failure.ignore=true -Dmaven.repo.local=${env.WORKSPACE}/repo  -DmavenDistro=${env.WORKSPACE}/apache-maven/target/apache-maven-bin.zip -DwrapperDistroDir=${env.WORKSPACE}/apache-maven/target -DmavenWrapper=${env.WORKSPACE}/maven-wrapper/target/maven-wrapper.jar"
         }
       }