Ability to configure the daemon storage location, fixes #673 (#678)

This commit is contained in:
Guillaume Nodet
2022-08-29 23:15:15 +02:00
committed by GitHub
parent dc69f258be
commit 5e59c40453
2 changed files with 3 additions and 1 deletions

View File

@@ -191,7 +191,9 @@ public class DaemonParameters {
public Path daemonStorage() {
return value(Environment.MVND_DAEMON_STORAGE)
.orEnvironmentVariable()
.orSystemProperty()
.orLocalProperty(provider, globalPropertiesPath())
.orDefault(
() -> userHome().resolve(".m2/mvnd/registry/" + BuildProperties.getInstance().getVersion()).toString())
.asPath();

View File

@@ -125,7 +125,7 @@ public enum Environment {
* The directory under which the daemon stores its registry, log files, etc.
* Default: <code>${user.home}/.m2/mvnd</code>
*/
MVND_DAEMON_STORAGE("mvnd.daemonStorage", null, null, OptionType.PATH, Flags.NONE),
MVND_DAEMON_STORAGE("mvnd.daemonStorage", "MVND_DAEMON_STORAGE", null, OptionType.PATH, Flags.NONE),
/**
* The path to the daemon registry.
* Default: <code>${mvnd.daemonStorage}/registry.bin</code>