reda-alaoui commented on code in PR #176: URL: https://github.com/apache/maven-build-cache-extension/pull/176#discussion_r1734733542
########## src/main/java/org/apache/maven/buildcache/CacheControllerImpl.java: ########## @@ -255,6 +255,11 @@ private CacheResult analyzeResult(CacheContext context, List<MojoExecution> mojo build.getCacheImplementationVersion()); } + if (lifecyclePhasesHelper.isLaterPhaseThanBuild("package", build)) { + LOGGER.warn("Cached build doesn't include phase 'package', cannot restore"); Review Comment: @AlexanderAshitkin I agree with you. At first I wanted to fix the extension to make it able to save cache state on phase < package. But there is this sentence in the [documentation](https://maven.apache.org/extensions/maven-build-cache-extension/usage.html): > Once the extension is activated, the cache automatically kicks in on every package or higher phase. I could not find the reason of this constraint, so I made sure this fix respects the latter. Also the fix should be quick to merge to prevent people from getting into trouble. I also think this extension should not limit itself to phases >= `package`. We can still come back to that later. -- 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