Plugin Build Process

Most Jenkins plugins are built with Maven. They typically use the Jenkins plugin POM as their parent POM, which provides a sensible default configuration for the plugin build. The Maven HPI plugin is one of the plugins configured there. It does the heavy lifting, such as bundling plugins in the HPI/JPI archive format used for Jenkins plugins, or allowing developers to run a debug Jenkins instance with the plugin.

Since version 2.0 of the plugin POM, it’s possible to specify the core version dependency of the parent POM independent of its version.footnote:1.x[Up to Jenkins 1.645, the plugin POM was kept in sync with Jenkins releases, so that the minimum required Jenkins version for a plugin determined the versions of the tools used to build the plugin. These versions should no longer be used.] This allows plugins compatible with older Jenkins releases to benefit from fixes and improvements in the parent POM. The plugin POM changelog provides more details.

Keeping up to date

It is generally recommended to frequently update to a recent plugin parent POM for multiple reasons:

  • Plugin developers and users benefit from bug fixes and improvements to the parent POM and the tools and libraries it specifies

  • Additions to the default build like static code analysis and general tests aim to improve the overall quality of plugins.

  • Recent versions of the tools (inherited from the parent plugins POM) allow developers to use more advanced tools like the plugin compatibility tester to determine whether their plugin is compatible with newest Jenkins releases.

References