(sorry, email got sent too early, nasty default shortcuts)

I have a Jenkinsfile pipeline build that uses our maven project. I also
have configured latest jdk8 (1.8.0_144) in the Global Tool Configuration.
When building the project on master node, the correct JDK is picked up:

*15:11:49* + 
/export/jenkins/tools/hudson.tasks.Maven_MavenInstallation/maven3.3.x/bin/mvn
--batch-mode --show-version [more maven args...]

*15:11:49* Apache Maven 3.3.9
(bb52d8502b132ec0a5a3f4c09453c07478323dc5;
2015-11-10T17:41:47+01:00)*15:11:49* Maven home:
/export/jenkins/tools/hudson.tasks.Maven_MavenInstallation/maven3.3.x*15:11:49*
Java version: 1.8.0_144, vendor: Oracle Corporation*15:11:49* Java
home: /export/jenkins/tools/hudson.model.JDK/jdk8/jre*15:11:49*
Default locale: en_US, platform encoding: UTF-8*15:11:49* OS name:
"linux", version: "3.10.0-514.26.2.el7.x86_64", arch: "amd64", family:
"unix"


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.

On Fri, Aug 4, 2017 at 4:48 PM, ST <st.mailingli...@gmail.com> wrote:

> I have a Jenkinsfile pipeline build that uses our maven project. I also
> have configured latest jdk8 (1.8.0_144) in the Global Tool Configuration.
> When building the project on master node, the correct JDK is picked up:
>
> *15:11:49* + 
> /export/jenkins/tools/hudson.tasks.Maven_MavenInstallation/maven3.3.x/bin/mvn 
> --batch-mode --show-version [more maven args...]
>
> *15:11:49* Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 
> 2015-11-10T17:41:47+01:00)*15:11:49* Maven home: 
> /export/jenkins/tools/hudson.tasks.Maven_MavenInstallation/maven3.3.x*15:11:49*
>  Java version: 1.8.0_144, vendor: Oracle Corporation*15:11:49* Java home: 
> /export/jenkins/tools/hudson.model.JDK/jdk8/jre*15:11:49* Default locale: 
> en_US, platform encoding: UTF-8*15:11:49* OS name: "linux", version: 
> "3.10.0-514.26.2.el7.x86_64", arch: "amd64", family: "unix"
>
>
>
> However when trying to build the same project on another build node, the
> build uses the default JDK installed on the build node:
>
>
>
> The Jenkins slave nodes are configured as
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CABwQARurwAO_x11-ifCr_-Y6SdUOyETecb3kaGZa9BXMzBCS%3DA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to