Skip to content

Align GitHub Actions build JDK with project Java target (21)#1

Open
sayednowshad with Copilot wants to merge 2 commits into
masterfrom
copilot/fix-github-actions-build-job
Open

Align GitHub Actions build JDK with project Java target (21)#1
sayednowshad with Copilot wants to merge 2 commits into
masterfrom
copilot/fix-github-actions-build-job

Conversation

Copilot AI commented Jul 26, 2026

Copy link
Copy Markdown

The build GitHub Actions job fails because CI compiles with JDK 17 while the project is configured for Java 21 in pom.xml. This PR updates the workflow runtime to match the project target so Maven can compile successfully.

  • Root cause

    • CI workflow used actions/setup-java with java-version: '17'
    • Maven compiler target is release 21 via <java.version>21</java.version>
  • Change

    • Updated .github/workflows/maven.yml to use Temurin JDK 21 in the build job.
  • Resulting config alignment

    # .github/workflows/maven.yml
    - name: Set up JDK 21
      uses: actions/setup-java@v4
      with:
        java-version: '21'
        distribution: 'temurin'
        cache: maven

Copilot AI changed the title [WIP] Fix failing GitHub Actions job build Align GitHub Actions build JDK with project Java target (21) Jul 26, 2026
Copilot AI requested a review from sayednowshad July 26, 2026 16:17
@sayednowshad sayednowshad reopened this Jul 26, 2026
@sayednowshad
sayednowshad marked this pull request as ready for review July 26, 2026 16:17
Copilot AI review requested due to automatic review settings July 26, 2026 16:17

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the GitHub Actions Maven workflow to use Java 21 so CI matches the project’s Maven java.version target and can compile successfully.

Changes:

  • Switched actions/setup-java from JDK 17 to JDK 21 in the build job.
  • Updated the step name to reflect the new JDK version.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 22 to 26
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants