Plugin build on uses Java 8, needs Java 11

We’re trying to release major changes to fortify-on-demand-uploader-plugin, and part of those changes required us to change our minimum supported Jenkins version from 2.289 to 2.375. This now requires the plugin be built with Java 11. However the automated build is still trying to build with Java 1.8 and is failing because of it. The only reference we found that could determine that is “java.level” in the pom which we changed from 8 to 11.

Is there something else we need to change or does this need to be changed in CI config (we don’t have access to it)


Build error

Specifying the java.level property has no impact and doesn’t actually do anything. You forgot to modify your Jenkinsfile according to the standard Jenkinsfile.

You might also consider the “Improve a plugin” tutorial while you’re working on the plugin. It includes several other items that will improve your experience as a plugin maintainer. The specific tutorial step in this case is “Add a Jenkinsfile”.

If you don’t mind reading something that is less structured than the tutorial, there are even more hints in the DevOps World 2021 workshop document. However, those hints are sometimes wrong or are not applicable to all plugins.

We added the args to our Jenkinsfile from Add a Jenkinsfile to specify jdk 11 but it’s still building with 1.8