Skip to content

Update Java version to 21 and GitHub Actions to latest versions#39

Merged
carstenartur merged 2 commits into
masterfrom
copilot/update-java-version-to-21
Dec 20, 2025
Merged

Update Java version to 21 and GitHub Actions to latest versions#39
carstenartur merged 2 commits into
masterfrom
copilot/update-java-version-to-21

Conversation

Copy link
Copy Markdown

Copilot AI commented Dec 20, 2025

Maven build fails with Tycho 5.0.1 requiring Java 21 (class file version 65.0), but workflow uses Java 17.

Changes

  • .github/workflows/maven.yml: Update Java 17→21, actions/checkout@v3v4, actions/setup-java@v3v5
  • .github/workflows/codeql-analysis.yml: Update actions/checkout@v3v4
  • .github/workflows/{codacy,dependency-review,rebase}.yml: Update actions/checkout@v3v4
- name: Set up JDK 21
  uses: actions/setup-java@v5
  with:
    java-version: '21'
    distribution: 'temurin'
    cache: maven

Resolves the P2ArtifactRepositoryLayout class version incompatibility error preventing Maven builds from completing.

Original prompt

Problem

The Maven build is failing with the following error:

Type org.eclipse.tycho.p2maven.repository.P2ArtifactRepositoryLayout not present: 
org/eclipse/tycho/p2maven/repository/P2ArtifactRepositoryLayout has been compiled by 
a more recent version of the Java Runtime (class file version 65.0)

Class file version 65.0 corresponds to Java 21. The Tycho version 5.0.1 used in this project requires Java 21, but the workflow currently uses Java 17.

Required Changes

1. Update .github/workflows/maven.yml

Change the Java version from 17 to 21:

- name: Set up JDK 21
  uses: actions/setup-java@v5
  with:
    java-version: '21'
    distribution: 'temurin'
    cache: maven

Also update the GitHub Actions to their latest versions:

  • actions/checkout@v3actions/checkout@v4
  • actions/setup-java@v3actions/setup-java@v5

2. Check other workflow files

Review and update any other workflow files in .github/workflows/ that use Java (e.g., pr-checks.yml, codeql-analysis.yml, codeql.yml) to also use Java 21 and the latest action versions where applicable.

Expected Outcome

After these changes, the Maven build should complete successfully without the Java version incompatibility error.

This pull request was created from Copilot chat.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: carstenartur <3164220+carstenartur@users.noreply.github.com>
Copilot AI changed the title [WIP] Update Java version to 21 in workflows Update Java version to 21 and GitHub Actions to latest versions Dec 20, 2025
Copilot AI requested a review from carstenartur December 20, 2025 09:53
@carstenartur carstenartur marked this pull request as ready for review December 20, 2025 09:58
@carstenartur carstenartur merged commit d969664 into master Dec 20, 2025
4 of 6 checks passed
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.

2 participants