[
https://issues.apache.org/jira/browse/MBUILDCACHE-78?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17956889#comment-17956889
]
Olivier Lamy commented on MBUILDCACHE-78:
-----------------------------------------
This project has moved from Jira to GitHub Issues. This issue was migrated to
[apache/maven-build-cache-extension#270|https://github.com/apache/maven-build-cache-extension/issues/270].
Please visit the GitHub issue to view further activity, add comments, or
subscribe to receive notifications.
> Maven reactor doesn't work well for a multimodule project when enabling build
> cache
> -----------------------------------------------------------------------------------
>
> Key: MBUILDCACHE-78
> URL: https://issues.apache.org/jira/browse/MBUILDCACHE-78
> Project: Maven Build Cache Extension (Moved to GitHub Issues)
> Issue Type: Bug
> Affects Versions: 1.1.0
> Environment: macOS Sonama, Java 17, Maven 3.9.6
> Reporter: Hongxin Liang
> Priority: Critical
> Labels: pull-request-available
>
> In a multimodule project, as a simplest example:
> [https://github.com/honnix/cache|https://github.com/honnix/cache] , "mvn
> compile" with build cache enabled doesn't play well with Maven reactor. A few
> scenarios I have tested in the provided repro example:
> # With a clean environment (no build cache, no "mvn install" have been done)
> ## Run "mvn compile" and everything works
> ## Modify (putting a random empty line will suffice) class "B" in module "b"
> ## Run "mvn compile" again, and now it fails when trying to download
> snapshot of module "a" from maven central (after failing to find that in my
> local repo)
> # With a clean environment (no build cache)
> ## Run "mvn install" and everything works
> ## Modify class "A" in module "a" to rename the method
> ## Run "mvn compile" for the first time, and it fails to compile due to
> renaming of the method in class "A"
> ## Run "mvn compile" for the second time, nothing fails but apparent the
> code is still wrong; run more "mvn compile" and still nothing fails
> ## Running "mvn install" fails the build due to compilation error
> I'm not entirely sure I am doing things properly and I'm not sure whether the
> config is correct either (I took the example as
> [https://maven.apache.org/extensions/maven-build-cache-extension/maven-build-cache-config.xml]
> with modification to disable remote cache).
--
This message was sent by Atlassian Jira
(v8.20.10#820010)