<properties> <jenkins.version>2.190.2</jenkins.version> </properties>
Your plugin’s POM controls which version of Jenkins it is building/testing against.
You need to balance compatibility and features:
Keeping the Jenkins version your plugin builds against low will allow more users to install and use your plugin. In particular, the LTS Release Line is based on slightly older releases to provide a more stable experience for conservative users.
Building against recent Jenkins versions allows you to use recently added core features and API from your plugin.
You will also use that newer version for
mvn hpi:run, so it may be easier to test your plugin with newer Jenkins releases.
Additionally, since features are sometimes moved from core into plugins, depending on a more recent Jenkins version will make your plugin’s dependencies on what used to be core features explicit, otherwise your plugin will not work.
Use at least the minimum version supported by the update center, the supported update center versions can be found at updates.jenkins.io, at the time of writing (2019-10) this is 2.138.x.
There are statistics of core versions by plugin that can help you decide.
These are updated monthly.
General tip: When upgrading, choose the newest LTS version that doesn’t alienate the majority of users of your latest few releases (by requiring a newer Jenkins than they have).