Offer a new Unarchive installer which takes Java archive structure into account

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      Jenkins installation
      Installed from docker image jenkinsci/docker - README.me

      Plugins
      Pipeline Maven Plugin

      Configuration - configureTools

      1. JDK :
      2. Maven :
        • name : Default
        • install automatically : true (Install from Apache)
        • version : 3.6.0

      Jenkinsfile
       

      pipeline {
          agent any
      
          stages {
              stage('Clean') {
                  steps {
                      withMaven(maven: 'Default',jdk: 'Java 10') {
                          sh "echo JAVA_HOME=$JAVA_HOME"
                          sh "mvn clean"
                      }
                  }
              }
          }
      }
      

      Error

      [Pipeline] // stage
      [Pipeline] withEnv
      [Pipeline] {
      [Pipeline] stage
      [Pipeline]\{ (Clean)
      [Pipeline] withMaven
      [withMaven] Options: []
      [withMaven] Available options:
      [withMaven] using JDK installation Java 10
      [withMaven] using Maven installation 'Default' [Pipeline] {
      [Pipeline] sh
      + echo 'JAVA_HOME=/var/jenkins_home/tools/hudson.model.JDK/Java_10'
      JAVA_HOME=/var/jenkins_home/tools/hudson.model.JDK/Java_10
      [Pipeline] sh
      + mvn clean -B -V
      ----- withMaven Wrapper script -----
      The JAVA_HOME environment variable is not defined correctly
      This environment variable is needed to run this program
      NB: JAVA_HOME should point to a JDK not a JRE
      [Pipeline] }
      

      Actual
      JAVA_HOME=/var/jenkins_home/tools/hudson.model.JDK/Java_10

      Expected
      JAVA_HOME=/var/jenkins_home/tools/hudson.model.JDK/Java_10/jdk-10.0.2

      Looks like the automatic set JEVA_HOME is missing the last part of the path

            Assignee:
            Unassigned
            Reporter:
            Benoit Le Gall
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Archived: