Skip to content

Commit

Permalink
Ability to configure the daemon storage location, fixes apache#673
Browse files Browse the repository at this point in the history
  • Loading branch information
gnodet committed Aug 29, 2022
1 parent dc69f25 commit 2cb135b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,9 @@ public Path globalPropertiesPath() {

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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down

0 comments on commit 2cb135b

Please sign in to comment.