<properties> <jenkins.version>2.249.1</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.
Do not use versions no longer supported by the update center, which is currently anything older than 2.204 for weekly releases, and 2.204.1 for LTS releases.
Prefer ".1" LTS releases over weekly versions and later releases within an LTS line for greater compatibility. LTS releases with the same baseline usually don’t have differences that would matter to plugin developers, and if they do, they may well behave differently on supposedly compatible weekly releases published shortly after the LTS baseline.
Prefer releases that no longer result in implied plugin dependencies. Sometimes Jenkins core features are moved into plugins, and any plugin with a dependency on an older core release will have an implied dependency on the new plugin. This makes plugin management more difficult for administrators, so core dependencies should ideally be chosen so that there are no, or few, implied dependencies. See split-plugins.txt for details. At this time, a dependency on Jenkins versions newer than 2.184 will not result in such implied dependencies.
At the moment, the Jenkins releases 2.235.1 and 2.249.1 make good core dependencies unless there are specific reasons, like new features, to choose a different release.