AlexanderAshitkin commented on code in PR #146:
URL: 
https://github.com/apache/maven-build-cache-extension/pull/146#discussion_r1623253391


##########
src/main/java/org/apache/maven/buildcache/checksum/MavenProjectInput.java:
##########
@@ -620,14 +631,26 @@ private static boolean isReadable(Path entry) throws 
IOException {
     }
 
     private SortedMap<String, String> getMutableDependencies() throws 
IOException {
+        return getMutableDependenciesHashes("", project.getDependencies());
+    }
+
+    private SortedMap<String, String> getMutablePluginDependencies() throws 
IOException {
+        SortedMap<String, String> fullMap = new TreeMap<>();
+        for (Plugin plugin : project.getBuildPlugins()) {
+            if (config.isPluginDependenciesExcluded(plugin)) {
+                continue;
+            }
+            fullMap.putAll(getMutableDependenciesHashes(
+                    
KeyUtils.getVersionlessArtifactKey(repoSystem.createPluginArtifact(plugin)) + 
"|",

Review Comment:
   Maven allows the same plugin to run more than once with different dependency 
sets. In this case, the last plugin declaration wins, the dependencies of the 
first plugin are discarded, and the checksum might be incorrect. Every plugin 
declaration must contribute to the checksum—instead of the map, the result 
should be a list of items.



-- 
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: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to