From 102edec8ae7080e7e06a0a9ca06803b13586f12e Mon Sep 17 00:00:00 2001 From: Chao Wang Date: Wed, 1 Apr 2026 08:38:46 +0800 Subject: [PATCH 1/2] 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 --- .github/workflows/pr.yml | 4 ++-- .github/workflows/release.yml | 4 ++-- README.md | 9 +++++---- pom.xml | 2 +- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index afbb35c5..3979aed2 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -14,11 +14,11 @@ jobs: checks: write pull-requests: write env: - MAIN_JAVA_VER: 17 + MAIN_JAVA_VER: 21 RUN_PYTHON_BIN: ${{ vars.RUN_PYTHON_BIN }} strategy: matrix: - java: [17, 21] + java: [21] steps: - name: Checkout sources uses: actions/checkout@v6 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c4e148f3..4fc9200e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -25,10 +25,10 @@ jobs: - name: Checkout uses: actions/checkout@v6 - - name: Set up Java 17 + - name: Set up Java 21 uses: actions/setup-java@v5 with: - java-version: '17' + java-version: '21' distribution: 'temurin' cache: 'maven' gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} diff --git a/README.md b/README.md index 6281af21..7602e3ef 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,8 @@ * Looking for our JavaScript/TypeScript API? Try [Trustify DA JavaScript Client](https://github.com/guacsec/trustify-da-javascript-client). * Looking for our Backend implementation? Try [Trustify Dependency Analytics](https://github.com/guacsec/trustify-dependency-analytics). +**Requires Java 21 or later.** + The _Trustify DA Java Client_ module is deployed to _GitHub Package Registry_.
@@ -824,10 +826,9 @@ Released artifacts are available on [Maven Central](https://repo1.maven.org/mave -- For maven pom.xml, it has been noticed that using java 17 might cause stack analysis to hang forever. - This is caused by maven [`dependency` Plugin](https://maven.apache.org/plugins/maven-dependency-plugin/) bug when running with JDK/JRE' JVM version 17. - - 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.) +- For maven pom.xml, it has been noticed that using Java 17 might cause stack analysis to hang forever. + This is caused by maven [`dependency` Plugin](https://maven.apache.org/plugins/maven-dependency-plugin/) bug when running with JDK/JRE JVM version 17. + This project now requires Java 21 as the minimum version, which is not affected by this issue. diff --git a/pom.xml b/pom.xml index 4bf7f752..c40420b1 100644 --- a/pom.xml +++ b/pom.xml @@ -16,7 +16,7 @@ 81% 50 UTF-8 - 17 + 21 2.0.7 2.21.2 From a4448fae6f36ce83381a060b21d48c91f3406b9f Mon Sep 17 00:00:00 2001 From: Chao Wang Date: Wed, 1 Apr 2026 08:57:09 +0800 Subject: [PATCH 2/2] fix: update integration workflow, enforcer rule, and Java badge for Java 21 - Point integration workflow to soul2zimate/exhort-integration-tests which has Java 21 configured - Update Maven Enforcer requireJavaVersion from [11,) to [21,) - Update Java version badge in CONTRIBUTING.md from 11 to 21 Implements TC-3969 Assisted-by: Claude Code --- CONTRIBUTING.md | 2 +- pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c7d6ca95..42512015 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -113,4 +113,4 @@ contribution. See the [DCO](DCO) file for details. [1]: https://github.com/guacsec/trustify-da-api-spec/blob/main/api/v5/openapi.yaml -[10]: https://badgen.net/badge/Java%20Version/11/5382a1 +[10]: https://badgen.net/badge/Java%20Version/21/5382a1 diff --git a/pom.xml b/pom.xml index c40420b1..6060d36e 100644 --- a/pom.xml +++ b/pom.xml @@ -628,7 +628,7 @@ limitations under the License.]]> - [11,) + [21,) [3.8,)