Issue #496 Support maven.build.cache.skipSave as module-level property#497
Open
alascbio wants to merge 1 commit into
Open
Issue #496 Support maven.build.cache.skipSave as module-level property#497alascbio wants to merge 1 commit into
alascbio wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #496
Description
At the moment, the build cache extension supports maven.build.cache.skipCache as a module-level property in pom.xml,
allowing specific modules to skip cache lookup.
However, maven.build.cache.skipSave does not currently behave the same way: it can be set from the CLI, but not as a module-level property.
This creates an inconsistency in multi-module builds.
A concrete issue is that a module can be configured with:
to avoid reading from the cache, while still writing new entries to the cache at the end of the build.
In practice, this means a module can be excluded from cache lookup but still update the cache, which is not always desirable.
Expected behavior
Support the following in module pom.xml:
When set on a module, this property should prevent cache writes for that module,
while still allowing cache reads unless maven.build.cache.skipCache=true is also set.
This would make skipSave consistent with the existing module-level behavior of skipCache.
Following this checklist to help us incorporate your
contribution quickly and easily:
Note that commits might be squashed by a maintainer on merge.
This may not always be possible but is a best-practice.
mvn verifyto make sure basic checks pass.A more thorough check will be performed on your pull request automatically.
mvn -Prun-its verify).