efegokdemir opened a new pull request, #3523:
URL: https://github.com/apache/maven-surefire/pull/3523

   Fixes #3521.
   
   For modular test descriptors, Surefire added `--add-opens` for 
`org.junit.platform.commons` even when Commons was only on the provider 
classpath. The forked JVM then warned that the named module was unknown.
   
   Only add these options when Commons is also a test dependency and is 
therefore on the test module path. Existing opens remain in place when Commons 
is present there.
   
   Tests:
   - `mvn -pl maven-surefire-common test` on JDK 21 — 867 passed, 6 skipped.
   - `mvn -pl maven-surefire-common spotless:check checkstyle:check` — passed.
   - The regression assertion failed before the fix because both `--add-opens` 
options were emitted without Commons on the test module path.
   
   ---
   
   To make clear that you license your contribution under the
   [Apache License Version 2.0, January 
2004](https://www.apache.org/licenses/LICENSE-2.0)
   check one of the following:
   
   - [x] I hereby declare this contribution to be licensed under the [Apache 
License Version 2.0, January 2004](https://www.apache.org/licenses/LICENSE-2.0)
   - [ ] I hereby declare that I have filed an [Apache Individual Contributor 
License Agreement](https://www.apache.org/licenses/icla.pdf).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to