Copilot commented on code in PR #3648:
URL: https://github.com/apache/maven-surefire/pull/3648#discussion_r4729273017


##########
maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java:
##########
@@ -2881,14 +2881,17 @@ private String getConfigChecksum() {
         checksum.add(getClasspathDependencyExcludes());
         checksum.add(getClasspathDependencyScopeExclude());
         checksum.add(getAdditionalClasspathElements());
+        checksum.add(additionalClasspathDependencies);

Review Comment:
   `ChecksumCalculator.add(List<?>)` hashes each dependency's `toString()`, 
which omits classifier and exclusions (see Maven's [default-branch 
implementation](https://github.com/apache/maven/blob/edd58872f927fd7c4c642021a70dc8359bdc9cf5/api/maven-api-model/src/main/mdo/maven.mdo#L1359-L1362)).
 Executions differing only in those fields therefore still receive the same 
checksum, so the second execution is skipped despite having a different test 
classpath. Serialize the resolution-relevant fields explicitly, including 
exclusions, and add regression cases comparing two non-null dependency lists 
with different classifiers or exclusions.



-- 
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