Copilot commented on code in PR #3523:
URL: https://github.com/apache/maven-surefire/pull/3523#discussion_r4651913635
##########
maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java:
##########
@@ -3236,7 +3237,42 @@ public void addProviderProperties() throws
MojoExecutionException {
@Nonnull
@Override
public List<String[]> getJpmsArguments(@Nonnull ProviderRequirements
forkRequirements) {
- return
ModulePathJpmsArguments.junitPlatformArguments(forkRequirements);
+ boolean commonsDependency =
+
testClasspath.getTestDependencies().containsKey("org.junit.platform:junit-platform-commons");
Review Comment:
For test-module runs, matching Commons coordinates still enable both
`--add-opens` options even when the artifact contributes no module, leaving the
unknown-module warnings. `TestClassPath.toClasspath()` skips artifacts whose
handler does not add them to the classpath (for example, a `pom` dependency) or
whose file is null. Apply those same eligibility checks here, and update the
provider and Shadefire tests to distinguish eligible from ineligible artifacts.
--
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]