Skip to content

Commit

Permalink
Require 2.452.4 and use API plugins (#152)
Browse files Browse the repository at this point in the history
* Require 2.452.4 and link againts API plugin

* Add Jenkins core BOM for commons-beanutils version

https://www.jenkins.io/doc/developer/plugin-development/dependency-management/#jenkins-core-bom says:

> Jenkins core provides a Maven Bill Of Materials (BOM) that centrally
> defines versions of various libraries used by Jenkins. If you are using
> Maven to build your plugin, then you can simplify dependency management
> by importing this BOM, at jenkins.version. Dependency versions are then
> automatically synchronized with the version of Jenkins against which
> you are building.

Since commons-beanutils is included in the Jenkins core BOM, we can
reference it as "provided" and since the Jenkins core BOM is now
included, we can rely on the Jenkisn core BOM to manage the version
of commons-beanutils.

That seemed to resolve the upper bounds dependency error and let me
learn more about the Jenkins core BOM.

Testing done:

* Tested with Jenkins 2.462.3 by creating a line plot that used a file
  named "plot-b.csv" with data that I added after each build.  The plot
  was shown correctly when the plot was defined in the freestyle project
  as a post build action.

* Tested with Jenkins 2.462.3 by creating a line plot as a build step
  and that failed with tip of the master branch and with the changes in
  this pull request.  I don't know if that is a recent failure or if it has
  been there a long time.  It has not been reported in the issue tracker.

---------

Co-authored-by: Mark Waite <mark.earl.waite@gmail.com>
  • Loading branch information
jonesbusy and MarkEWaite authored Jan 5, 2025
1 parent 3484dff commit 3726a04
Showing 1 changed file with 23 additions and 3 deletions.
26 changes: 23 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
</parent>

<properties>
<!-- Baseline Jenkins version you use to build the plugin. Users must have this version or newer to run. -->
<jenkins.baseline>2.361</jenkins.baseline>
<!-- https://www.jenkins.io/doc/developer/plugin-development/choosing-jenkins-baseline/ -->
<jenkins.baseline>2.452</jenkins.baseline>
<jenkins.version>${jenkins.baseline}.4</jenkins.version>
</properties>

Expand All @@ -20,7 +20,14 @@
<dependency>
<groupId>io.jenkins.tools.bom</groupId>
<artifactId>bom-${jenkins.baseline}.x</artifactId>
<version>2102.v854b_fec19c92</version>
<version>3875.v1df09947cde6</version>
<scope>import</scope>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.jenkins-ci.main</groupId>
<artifactId>jenkins-bom</artifactId>
<version>${jenkins.version}</version>
<scope>import</scope>
<type>pom</type>
</dependency>
Expand Down Expand Up @@ -50,6 +57,19 @@
</developers>

<dependencies>
<dependency>
<groupId>commons-beanutils</groupId>
<artifactId>commons-beanutils</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>io.jenkins.plugins</groupId>
<artifactId>commons-lang3-api</artifactId>
</dependency>
<dependency>
<groupId>io.jenkins.plugins</groupId>
<artifactId>commons-text-api</artifactId>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>matrix-project</artifactId>
Expand Down

0 comments on commit 3726a04

Please sign in to comment.