Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 11 Next »

This page is a collaborative entry point for developer resources about developing and testing Jenkins to run on Java 11.

This page is not designed to receive status updates for user-facing issues. But you are more than welcome to check and report such issues so that they show on the dedicated Known Java 11 Compatibility issues wiki page. 

How to

Run Jenkins using Java 11

WIP: Stay tuned: an article is planned to land on jenkins.io in the next hours/days (smile).

Develop and test your plugin for running on Java 11

Jenkins development tools have been updated to support building and testing with JDK11

  1. For non-experimental releases you should always build the plugins with java.level=8. 
    1. As a part of JEP-211, we request all plugins to remain compatible with Java 8 for now
  2. Use plugin-pom:3.29+ (changelog). Versions before 3.29 contain some updates to be able to build and test your plugins using JDK 11
  3. Plugins will be able to compile successfully with JDK 11 if and only if Jenkins Core version (jenkins.version) is above 2.138+
  4. You can update Jenkinsfile to run tests with Java 11. In order to workaround the Jenkins core requirement, a full configuration matrix may be used in buildPlugin():
    1. Example: Jenkinsfile in the Label Verifier Plugin

Some potential pitfalls to remember about:

  • The existing "mvn hpi:run" command will not work correctly on Java 11 unless Java modules are downloaded and passed to the environment ( JENKINS-54807 - Getting issue details... STATUS )
  • If you use Mockito/PowerMock in your plugin tests, you may need to update to the recent versions with Java 11 support 
    • JENKINS-55098 - Getting issue details... STATUS  tracks adding the versions to Plugin POM dependency management
  • In some cases FindBugs may crash in some cases ( JENKINS-53692 - Getting issue details... STATUS )

See the "Known developer tools issues" for more known issues in Plugin POM and Jenkins plugins.

Release a plugin specifically for Java 11

Current intermediate solution

First, please avoid doing this.

If you really think you have a case where you need it, we encourage you to come over the Jenkins developers mailing list to expose your case and see if we can find another way.

In any case, the strongly recommended way to handle this is:

Long term solution

The long-term solution is already on its way, but is not delivered yet. It's partly delivered by you bumping to the last 3.29+ parent pom so your plugin embeds a "minimum Java" metadata, plus adapting Jenkins core to use this metadata to filter out releases for a version of Java that is higher than the current runtime. Follow  JENKINS-20679 - Getting issue details... STATUS  and  JENKINS-55048 - Getting issue details... STATUS  if you are interested.

Run Plugin Compat Tester (aka PCT) using Java 11

Documented in the PCT repository: https://github.com/jenkinsci/plugin-compat-tester#running-pct-with-custom-java-versions

Run Acceptance Test Harness (aka ATH) using Java 11

Documented on the ATH repository: https://github.com/jenkinsci/acceptance-test-harness/blob/master/docs/JAVA11.md

Known developer tools issues

Please add known issues here. The preferred way is to create or find the associated JIRA in the Jenkins Issue Tracker, and add the "java11-devtools-compatibility". Then the issue  it will automatically show up in the list below.

If you cannot create a JIRA issue, please still feel free to add notes about your findings below.

(associated JIRA board for the following filter)

T Key Component/s Summary P Status released as
Loading...
Refresh



  • No labels