apache / apache/maven

after migration from jdk17 to jdk21 junit is failing and ignoring surefire arling arguments for --add-open java.lang and junit fails throwing InaccessbleObjectException

Open
#11,398 5 comments 0 reactions 0 assignees View on GitHub
invalid mvn3
Dominant language
Java
Stars
5.3k
Forks
3.1k
Avg merge
20h 42m
Merged PRs (30d)
297

Description

### Affected version

jdk21 maven version is 3.9.9 maven-compiler-plugin.version=3.14.0,Jacoco Version 0.8.11, aven Surefire Plugin 3.1.2

### Bug description

We have migrated our springboot project from jdk17 to jdk21. In pom I have changed 1. jdk version to 21, 2. 3.14.0 3. jacoco.version> 0.8.11 in and has --add-open java.base/java.lang=All-UNNAMED. This pom has reference to pom which in turn has springboot-starter-parent defined as tag with version as 3.2.5. 3 junits are failing with InAccessibleObjectException related to reflection. which we otherwise passing during clean intall with jdk17 and --add-open option defined in pom. are the version correct for jdk21

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.