Updating Your Maven Parent POM

View the index of available developer guides

Most Jenkins plugins use Apache Maven as their build tool. Here are some tips on bringing your plugin up to current recommendations.

Using the 2.x (or newer) parent POM

Properly maintained Jenkins plugins are expected to use a 2.x-series (or newer) parent POM, the later the better, to define the basic structure of pom.xml.

You can use Maven itself to create a new plugin:

If you are instead upgrading an older plugin, replace a header such as

<parent>
    <groupId>org.jenkins-ci.plugins</groupId>
    <artifactId>plugin</artifactId>
    <version>1.625</version>
</parent>

with the new format:

<parent>
    <groupId>org.jenkins-ci.plugins</groupId>
    <artifactId>plugin</artifactId>
    <version>2.33</version>
    <relativePath />
</parent>
<properties>
    <jenkins.version>1.625</jenkins.version>
</properties>

Understanding requireUpperBoundDeps failures and fixes

TODO

Transitive dependency plugin too old

TODO Jenkins 2.12+ also checks this during InjectedTest, but more slowly

Improper attempt to use core component

TODO

Test-scoped dependency mismatch

TODO

Picking up fixes to dependency plugins

TODO

Suppressing violations

TODO

Shading libraries

TODO

Optional dependencies and extensions

TODO