How to change Jenkins Agent Maven's OpenJDK version in Openshift Container Platform 4

Solution In Progress - Updated -


The Jenkins Maven Agent by defaults uses OpenJDK 11, but it is possible to customize it to use OpenJDK 8:

bash-4.4# mvn -version
Apache Maven 3.6.2 (Red Hat 3.6.2-6)
Maven home: /usr/share/maven
Java version: 11.0.11, vendor: Red Hat, Inc., runtime: /usr/lib/jvm/java-11-openjdk-
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "5.10.25-linuxkit", arch: "amd64", family: "unix"


  • Red Hat Openshift Container Platform v4.7.
  • Red Hat Openshift Jenkins Maven Agent.
  • RHEL7/RHEL8.

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content