However when trying to build the same project on another build node, the build uses the system-default JDK installed on the build node:
16:22:59 + /export/jenkins/tools/hudson.tasks.Maven_MavenInstallation/maven3.3.x/bin/mvn --batch-mode --show-version [more maven args...]
16:22:59 Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-10T17:41:47+01:00)
16:22:59 Maven home: /export/jenkins/tools/hudson.tasks.Maven_MavenInstallation/maven3.3.x
16:22:59 Java version: 1.8.0_141, vendor: Oracle Corporation
16:22:59 Java home: /usr/java/jdk1.8.0_141/jre
16:22:59 Default locale: en_US, platform encoding: UTF-8
16:22:59 OS name: "linux", version: "3.10.0-514.26.2.el7.x86_64", arch: "amd64", family: "unix"
The Global Tool Configuration seems to work fine for maven tool ,so why not for the jdk tool?
The Jenkins slave nodes are launched as "Launch slave agents via SSH", in case that is relevant.
Environment: Latest jenkins v3.72 with latest plugins, incl. SSH Slaves plugin v1.20.
Any ideas what could be wrong?
stefan.