[ 
https://issues.apache.org/jira/browse/MBUILDCACHE-87?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17853738#comment-17853738
 ] 

ASF GitHub Bot commented on MBUILDCACHE-87:
-------------------------------------------

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


##########
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:
   To keep `compareWithBaseline` feature operational with plugin dependencies, 
I added an occurrency index to the map key instead of turning the map into a 
collection.





> Checksum should consider plugin dependencies
> --------------------------------------------
>
>                 Key: MBUILDCACHE-87
>                 URL: https://issues.apache.org/jira/browse/MBUILDCACHE-87
>             Project: Maven Build Cache Extension
>          Issue Type: Improvement
>            Reporter: Réda Housni Alaoui
>            Priority: Major
>              Labels: pull-request-available
>
> I have a multi module project where module A is used as a dependency of 
> maven-dependency-plugin:unpack declared in module B.
> {{buildinfo.xml}} of module B does not consider module A as a dependency.
> Maybe something similar to 
> https://github.com/apache/maven-build-cache-extension/blob/6eb05e61fdfa7be1ad44cf6afc13958b0c6ea4a6/src/main/java/org/apache/maven/buildcache/checksum/MavenProjectInput.java#L602
>  should be added for plugin dependencies?



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to