-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Since Jacoco 0.8.9, "--add-opens java.base/java.lang=ALL-UNNAMED" has no effect. #1487
Comments
After the removal of JaCoCo from plugins {
id 'java'
- id 'jacoco'
}
ext {
@@ -11,7 +10,6 @@ ext {
mockitoInlineVersion = "5.2.0"
byteBuddyVersion = "1.14.5"
junitPlatformVersion = "1.9.3"
- jacocoVersion = "0.8.9"
reflectionsVersion = "0.10.2"
}
@@ -37,11 +35,6 @@ dependencies {
}
-jacoco {
- toolVersion = "${jacocoVersion}"
- reportsDirectory = layout.buildDirectory.dir("jacoco")
-}
-
test {
useJUnitPlatform()
} i.e. for the following
execution of test with following configuration anyway fails with the same exception
because the specification of VM Options in the above configuration does not affect JVM that executes test as can be seen in debug output
I do not know whether this is due to a bug in IntelliJ IDEA or somewhere else, but clearly not in JaCoCo. With JaCoCo versions 0.8.3 - 0.8.8 you might think that the above specification of VM Options has effect, because JaCoCo itself was erroneously opening The test passes with and without JaCoCo 0.8.9 when
and in this case debug output shows that option is passed to JVM that executes test
|
Hello @Godin It now works, so thank you very much! And I appreciate how you handled the triage, which is a really fantastic example for us to follow as we try to solve other similar problems. |
Steps to reproduce
git repo: https://github.com/zouyufei1989/jacocoTest
run Jacoco089Test with VM options: '--add-opens java.base/java.lang=ALL-UNNAMED'
Expected behaviour
success as running org.example.Main
Actual behaviour
running test failed with VM options: '--add-opens java.base/java.lang=ALL-UNNAMED', which is different from running java program.
The text was updated successfully, but these errors were encountered: