Skip to content

Commit 102edec

Browse files
committed
feat: upgrade Java compilation target from 17 to 21
- Update maven.compiler.release from 17 to 21 in pom.xml - Update CI PR workflow MAIN_JAVA_VER to 21 and simplify test matrix - Update CI release workflow to use Java 21 - Add Java 21 minimum requirement to README - Revise Known Issues section for Java 17 hang warning Implements TC-3969 Assisted-by: Claude Code
1 parent 473aeb5 commit 102edec

File tree

4 files changed

+10
-9
lines changed

4 files changed

+10
-9
lines changed

.github/workflows/pr.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ jobs:
1414
checks: write
1515
pull-requests: write
1616
env:
17-
MAIN_JAVA_VER: 17
17+
MAIN_JAVA_VER: 21
1818
RUN_PYTHON_BIN: ${{ vars.RUN_PYTHON_BIN }}
1919
strategy:
2020
matrix:
21-
java: [17, 21]
21+
java: [21]
2222
steps:
2323
- name: Checkout sources
2424
uses: actions/checkout@v6

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ jobs:
2525
- name: Checkout
2626
uses: actions/checkout@v6
2727

28-
- name: Set up Java 17
28+
- name: Set up Java 21
2929
uses: actions/setup-java@v5
3030
with:
31-
java-version: '17'
31+
java-version: '21'
3232
distribution: 'temurin'
3333
cache: 'maven'
3434
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
* Looking for our JavaScript/TypeScript API? Try [Trustify DA JavaScript Client](https://github.com/guacsec/trustify-da-javascript-client).
44
* Looking for our Backend implementation? Try [Trustify Dependency Analytics](https://github.com/guacsec/trustify-dependency-analytics).
55

6+
**Requires Java 21 or later.**
7+
68
The _Trustify DA Java Client_ module is deployed to _GitHub Package Registry_.
79

810
<details>
@@ -824,10 +826,9 @@ Released artifacts are available on [Maven Central](https://repo1.maven.org/mave
824826

825827

826828

827-
- For maven pom.xml, it has been noticed that using java 17 might cause stack analysis to hang forever.
828-
This is caused by maven [`dependency` Plugin](https://maven.apache.org/plugins/maven-dependency-plugin/) bug when running with JDK/JRE' JVM version 17.
829-
830-
To overcome this, you can use any other java version (14,20,21, etc..). ( best way is to install JDK/JRE version different from 17 , and set the location of the installation in environment variable `JAVA_HOME` so maven will use it.)
829+
- For maven pom.xml, it has been noticed that using Java 17 might cause stack analysis to hang forever.
830+
This is caused by maven [`dependency` Plugin](https://maven.apache.org/plugins/maven-dependency-plugin/) bug when running with JDK/JRE JVM version 17.
831+
This project now requires Java 21 as the minimum version, which is not affected by this issue.
831832

832833

833834
<!-- Badge links -->

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<code.coverage.threshold>81%</code.coverage.threshold>
1717
<mutation.coverage.threshold>50</mutation.coverage.threshold>
1818
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
19-
<maven.compiler.release>17</maven.compiler.release>
19+
<maven.compiler.release>21</maven.compiler.release>
2020
<!-- Dependencies -->
2121
<trustify-da-api-model.version>2.0.7</trustify-da-api-model.version>
2222
<jackson.version>2.21.2</jackson.version>

0 commit comments

Comments
 (0)