The plugin bill of materials (BOM) defines the versions of various plugins used by specific Jenkins versions.
The plugin bill of materials includes many commonly used plugins
and simplifies dependency management for plugins that depend on other plugins.
A plugin that tests its Pipeline implementation typically depends on several Pipeline plugins.
The plugin BOM provides Pipeline plugin version numbers so that the developer does not need to maintain the independent version numbers of the Pipeline plugins.
The plugin bill of materials is defined in the dependencyManagement
section of your pom.xml file.
To use the Jenkins plugin BOM in your plugin:
-
Confirm that you are using the current parent pom with the command mvn versions:update-parent
-
Locate the most recent plugin bom version number on the plugin bom releases page
-
Copy the dependencyManagement
section from the pom.xml file in that directory
-
Insert this dependencyManagement
section into the pom.xml file for your plugin
<dependencyManagement>
<dependencies>
<dependency>
<groupId>io.jenkins.tools.bom</groupId>
<artifactId>bom-2.479.x</artifactId>
<!-- Latest version goes here -->
<version>4924.v6b_eb_a_79a_d9d0</version>
<scope>import</scope>
<type>pom</type>
</dependency>
</dependencies>
</dependencyManagement>
-
Remove the <version>
values from plugin dependencies in your plugin’s pom.xml
-
Rebuild your plugin to see if this solves your dependency issues.
Many commonly used plugins are included in the plugin pom.
However, not all plugins are included.
You may need to iterate on removing <version>
values from specific plugins
See the plugin BOM documentation for further details.
The video below demonstrates how to add the plugin BOM to a Jenkins plugin.
Simplify plugin dependency management with the plugin BOM