-1

I need to run my maven build with java 8 and sonarscan with java 11, but not sure how to do it in same job. When I am trying to build a job using java 8 in jenkins gui then sonar scan fails cz java 11 is missing to run and vise versa. Can you please suggest how to provide JAVA_HOME for both explicitly and where do we add it exactly in jenkins.

AniK
  • 55
  • 8

1 Answers1

0

Setting multiple Java/JDK instances is very easy using a Jenkins build pipeline, which should be the preferred way over the pure GUI configuration.

For details see: How to select multiple JDK version in declarative pipeline Jenkins

Yuri
  • 4,254
  • 1
  • 29
  • 46