jira-importer commented on issue #306: URL: https://github.com/apache/maven-build-cache-extension/issues/306#issuecomment-2955437720
**[Olivier Lamy](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=olamy)** commented `So this will happen for a single module project as well (multi-module is a distraction). ` nah the problem here is because of the multi module and so projects are part of the reactor build. External dependencies checksum calculation is using version because there is not access to projects inputs (sources, resources etc..). But here in the case of a multimodule, the reactor give access to the module buillds inputs (sources, resources etc..) simply because they are part of the build. Inter module dependencies (e.g modules part of the same reactor build) doesn't care (usually) of version change. project (version 1.0-SNAPSHOT) - module A (version 1.0-SNAPSHOT) - module B (version 1.0-SNAPSHOT) using module A (version 1.0-SNAPSHOT) When building module B the build cache extension can calculate real checksum of module A because it has direct access to sources, resources etc... In this case version number doesn't have any impact because the extension can calculate if something has really change (version number is not real change of nothing else has changed :) ) BUT in the case of the build need this version as part of the checksum build input calculation which is the case of m-plugin-p:descriptor goal which use to generate plugin metadata, we have a problem :) if you move all the tests modules using your plugin as invoker tests within the plugin code itself you may not have issues as those tests will not run when cache detects no changes. The other workaround now is to disable the cache for the maven plugin \<properties> .... <maven.build.cache.enabled>false</maven.build.cache.enabled> .... \</properties> or clean local cache entries: rm -rf ~/.m2/build-cache/v1/ Other than that we need to find a solution for maven-plugin type (when it's part of reactor build) project but something generic. A solution I tried was to force m-plugin-p to always run <executionControl> <runAlways> <goalsLists> ..... <goalsList artifactId="maven-plugin-plugin"> <goals> <goal>descriptor</goal> </goals> </goalsList> .... </goalsLists> </runAlways> but nah doesn't work as mvn clean install means deleted target/classes and so no way to scan for annotations. the solution could be a new feature to force restore output of a module. -- 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]
