Use plugin bill of materials

Simplify dependency management with the plugin bill of materials

Updating the versions of plugin dependencies manually can be exhausting, looking for the correct set of versions that work with each other and do not cause upper-bounds dependency error reports. The Jenkins plugin bill of materials simplifies that by shifting the evaluation of versions from each plugin author to a centralized process maintained by members of the Jenkins community.

Create a branch

Create a git branch for your local work with the command:

$ git checkout -b use-plugin-bom master

Use the plugin bill of materials

Add a dependencyManagement section to the dependencies section of the pom file that references the most recent version of the plugin bill of materials for that line. For example, the addition might look like:


Remove as many <version> declarations from the pom file as you can while still compiling successfully.

Compile the updated code with the command:

$ mvn clean verify

Create a pull request

Commit that change:

$ git add pom.xml
$ git commit -m "Use plugin bill of materials for easier dependency management"

Push the change to GitHub:

$ git push origin --set-upstream use-plugin-bom
Total 0 (delta 0), reused 0 (delta 0), pack-reused 0
remote: Create a pull request for 'use-plugin-bom' on GitHub by visiting:
 * [new branch]      use-plugin-bom -> use-plugin-bom
Branch 'use-plugin-bom' tracking remote branch 'use-plugin-bom'.

Notice that the output of the command includes the URL, which can be used to open a pull request. Copy that URL in your web browser and submit a pull request.