[build] Add Java 21 and Java 25 to CI as advisory builds
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Quiet
- Tech stack
- github-actions, java
- Domain
- build-system, ci-cd
Research direction
Start with the existing Java 17 jobs in .github/workflows/maven.yml and .github/workflows/maven_on_pull_request.yml. Review the workflow matrix, Maven commands, fail-fast setting, and experimental error handling. Done means both workflows show builds for Java 17, 21, and 25 with only Java 17 gating as specified; branch protection still needs maintainer attention.
Written by the indexing model from the issue text.
Description
Motivation
XChange currently builds and tests only against Java 17 (<version.java>17</version.java> in pom.xml). As Java 21 and 25 see growing adoption, we want early visibility into compile/test compatibility on those JDKs without changing our supported target. The new matrix entries should be informational only — failures must not block PR merges or develop pushes.
Proposed change
Convert the single-JDK build in both workflows to a matrix over Java 17, 21, and 25. Java 17 remains the sole gating entry; 21 and 25 are marked experimental and use continue-on-error: ${{ matrix.experimental || false }} so they cannot fail the workflow.
Files:
.github/workflows/maven.yml— push todevelop. Java 17 entry keepsmvn clean deploy; 21/25 usemvn clean verifyso no snapshots are published from non-17 JDKs..github/workflows/maven_on_pull_request.yml— PRs todevelop. All entries usemvn clean verify.
Both workflows set fail-fast: false so one experimental failure does not cancel the other JDK's run.
The Maven <release> target stays at 17 — we are testing that the project still builds/tests on newer JDKs, not retargeting bytecode.
Acceptance criteria
- Each workflow shows three matrix entries:
build (17),build (21),build (25). - A failure in
build (21)orbuild (25)leaves the workflow's overall conclusion green. - A failure in
build (17)still turns the workflow red. - On
maven.yml, only the Java 17 entry runsdeploy; 21 and 25 stop atverify.
Follow-up / caveats
- Branch protection. The required status check name changes from
buildtobuild (17). A maintainer with admin access toknowm/XChangeneeds to update the branch protection rule ondevelopaccordingly, otherwise the required check will appear missing on new PRs.
- Dominant language
- Java
- Stars
- 4.1k
- Forks
- 2k
- Avg merge
- 9d 1h
- Merged PRs (30d)
- 1
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from knowm/XChange
-
Difficulty 1/5 Under an hour Newbie friendliness 68/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
-
BChange1 Open
Difficulty 5/5 Over a week Newbie friendliness 1/100
-
Difficulty 4/5 3-5 days Newbie friendliness 20/100
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
infinispan/infinispan#18150 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
opensearch-project/k-NN#3597 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100