Skip to content

Pin JUnit to 5.x on the Java 11 line - #302

Merged
vpaturet merged 1 commit into
masterfrom
fix-junit5-java11
Sep 25, 2026
Merged

vpaturet merged 1 commit into
masterfrom
fix-junit5-java11

Conversation

@vpaturet

Copy link
Copy Markdown
Contributor

The CI build on master fails since #250 bumped JUnit to 6.1.3:

cannot access org.junit.jupiter.api.BeforeAll
  class file has wrong version 61.0, should be 55.0

JUnit 6 requires Java 17, while master compiles for Java 11 (jdk.version=11).

Changes:

  • pom.xml: junit.version 6.1.3 → 5.14.4 (latest 5.x)
  • renovate.json: restrict org.junit to <6.0.0 so Renovate does not propose JUnit 6 again on this line

mvn clean install passes locally (85 tests, 0 failures).

Note: the upgrade-netex-2.0 branch targets Java 21 and can use JUnit 6, so this rule and version should be left out when merging master into it.

JUnit 6 requires Java 17, but master compiles for Java 11, so test
compilation fails with 'class file has wrong version 61.0, should be 55.0'.
Revert junit.version to 5.14.4 (reverts #250) and add a Renovate rule
restricting org.junit to <6.0.0.
@sonarqubecloud

Copy link
Copy Markdown

@vpaturet
vpaturet merged commit 8f7f274 into master Sep 25, 2026
4 checks passed
@vpaturet
vpaturet deleted the fix-junit5-java11 branch September 25, 2026 06:31
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.

1 participant