Skip to content

Commit

Permalink
Prepare to test Java 21 (#571)
Browse files Browse the repository at this point in the history
* Bump actions/checkout from 4.0.0 to 4.1.0

Bumps [actions/checkout](https://github.com/actions/checkout) from 4.0.0 to 4.1.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@v4.0.0...v4.1.0)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump org.jenkins-ci.plugins:plugin from 4.73 to 4.74

Bumps [org.jenkins-ci.plugins:plugin](https://github.com/jenkinsci/plugin-pom) from 4.73 to 4.74.
- [Release notes](https://github.com/jenkinsci/plugin-pom/releases)
- [Changelog](https://github.com/jenkinsci/plugin-pom/blob/master/CHANGELOG.md)
- [Commits](jenkinsci/plugin-pom@plugin-4.73...plugin-4.74)

---
updated-dependencies:
- dependency-name: org.jenkins-ci.plugins:plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump io.jenkins.tools.bom:bom-2.387.x

Bumps [io.jenkins.tools.bom:bom-2.387.x](https://github.com/jenkinsci/bom) from 2446.v2e9fd3b_d8c81 to 2496.vddfca_753db_80.
- [Release notes](https://github.com/jenkinsci/bom/releases)
- [Commits](https://github.com/jenkinsci/bom/commits)

---
updated-dependencies:
- dependency-name: io.jenkins.tools.bom:bom-2.387.x
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump io.jenkins.plugins:code-coverage-api from 4.7.0 to 4.8.0

Bumps [io.jenkins.plugins:code-coverage-api](https://github.com/jenkinsci/code-coverage-api-plugin) from 4.7.0 to 4.8.0.
- [Release notes](https://github.com/jenkinsci/code-coverage-api-plugin/releases)
- [Changelog](https://github.com/jenkinsci/code-coverage-api-plugin/blob/master/CHANGELOG-old.md)
- [Commits](jenkinsci/code-coverage-api-plugin@v4.7.0...v4.8.0)

---
updated-dependencies:
- dependency-name: io.jenkins.plugins:code-coverage-api
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* Remove unnecessary java.level property

* Use plugin BOM to provide metrics and rest API versions

* Fix Java 21 tests by placing mockito before assertj

https://groups.google.com/g/byte-buddy/c/H3auRC-SRts/m/7NCRN2wAAwAJ
notes that the version of bytebuddy in assertj does not support Java 21
while the version of bytebuddy in mockito supports Java 21.  Load mockito
first so that the newer version of bytebuddy is used for the tests.

This change is necessary but not sufficient to pass the tests on Java 21.
The tests run much better on Java 21 with this change, but there are still
two tests that fail.  They will need to be investigated and resolved in
a separate pull request.

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • Loading branch information
MarkEWaite and dependabot[bot] authored Oct 15, 2023
1 parent 0f5d72c commit 3dc4362
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 22 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/codacy-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
steps:
# Checkout the repository to the GitHub Actions runner
- name: Checkout code
uses: actions/checkout@v4.0.0
uses: actions/checkout@v4.1.0

# Execute Codacy Analysis CLI and generate a SARIF output with the security issues identified during the analysis
- name: Run Codacy Analysis CLI
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v4.0.0
uses: actions/checkout@v4.1.0

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
33 changes: 13 additions & 20 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>plugin</artifactId>
<version>4.73</version>
<version>4.74</version>
<relativePath />
</parent>

Expand All @@ -19,15 +19,12 @@
<properties>
<!-- when updated the io.jenkins.tools.bom:bom-X.Y.Z must be updated too -->
<jenkins.version>2.387.3</jenkins.version>
<java.level>11</java.level>

<prometheus.simpleclient.version>0.16.0</prometheus.simpleclient.version>
<slf4j.version>2.0.9</slf4j.version>

<cloudbees-disk-usage-simple.version>0.10</cloudbees-disk-usage-simple.version>
<code-coverage-api.version>4.7.0</code-coverage-api.version>
<metrics.version>4.2.18-442.v02e107157925</metrics.version>
<pipeline-rest-api.version>2.21</pipeline-rest-api.version>
<code-coverage-api.version>4.8.0</code-coverage-api.version>

<assertj-core.version>3.24.2</assertj-core.version>
<JUnitParams.version>1.1.1</JUnitParams.version>
Expand Down Expand Up @@ -84,7 +81,7 @@
<dependency>
<groupId>io.jenkins.tools.bom</groupId>
<artifactId>bom-2.387.x</artifactId>
<version>2446.v2e9fd3b_d8c81</version>
<version>2496.vddfca_753db_80</version>
<scope>import</scope>
<type>pom</type>
</dependency>
Expand Down Expand Up @@ -137,14 +134,22 @@
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>metrics</artifactId>
<version>${metrics.version}</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins.pipeline-stage-view</groupId>
<artifactId>pipeline-rest-api</artifactId>
<version>${pipeline-rest-api.version}</version>
</dependency>

<!-- mockito must precede assertj until assertj supports Java 21 -->
<!-- mockito provides a Java 21 capable version of bytebuddy -->
<!-- TODO: restore ordering once assertj supports Java 21 -->
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<scope>test</scope>
</dependency>
<!-- assertj must follow mockito until assertj supports Java 21 -->
<!-- assertj does not provide a Java 21 capable version of bytebuddy -->
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
Expand All @@ -157,18 +162,6 @@
<version>${JUnitParams.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>${mockito.version}</version>
<scope>test</scope>
</dependency>
<!-- <dependency>-->
<!-- <groupId>org.mockito</groupId>-->
<!-- <artifactId>mockito-inline</artifactId>-->
<!-- <version>${mockito.version}</version>-->
<!-- <scope>test</scope>-->
<!-- </dependency>-->
<dependency>
<groupId>com.github.stefanbirkner</groupId>
<artifactId>system-lambda</artifactId>
Expand Down

0 comments on commit 3dc4362

Please sign in to comment.