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.