79118366

Date: 2024-10-23 14:34:35
Score: 1.5
Natty:
Report link

Turns out, you cannot specifically set the build cache directory via the command line. However, the default location is defined relative to the regular maven repository directory. So if you change the repository directory to ~/custom-maven-dir/repository via -Dmaven.repo.local=~/custom-maven-dir/repository/ then the build cache directory will be at ~/custom-maven-dir/build-cache

Thanks to https://stackoverflow.com/users/296328/khmarbaise for pointing me to the documentation that had the information about the relative default path for the build cache.

Note that you can set a fixed path for the build cache in the build cache extension config file (see https://maven.apache.org/extensions/maven-build-cache-extension/build-cache-config.html#class_local ) However, that is then a static setting for the project not a command line option.

Reasons:
  • Blacklisted phrase (0.5): Thanks
  • Blacklisted phrase (1): stackoverflow
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: FredWoozley