Store registry under ~/.m2 where we already have mvnd.properties

This commit is contained in:
Peter Palaga
2020-11-12 10:55:50 +01:00
parent a307be996a
commit 1b65cade65
2 changed files with 4 additions and 2 deletions

View File

@@ -172,7 +172,8 @@ public class DaemonParameters {
public Path daemonStorage() {
return value(Environment.MVND_DAEMON_STORAGE)
.orSystemProperty()
.orDefault(() -> userHome().resolve(".mvnd/v" + BuildProperties.getInstance().getVersion()).toString())
.orDefault(
() -> userHome().resolve(".m2/mvnd/registry/" + BuildProperties.getInstance().getVersion()).toString())
.asPath();
}

View File

@@ -67,7 +67,8 @@ public class DefaultClient implements Client {
}
DaemonParameters parameters = new DaemonParameters();
try (TerminalOutput output = new TerminalOutput(batchMode || parameters.noBuffering(), parameters.rollingWindowSize(), logFile)) {
try (TerminalOutput output = new TerminalOutput(batchMode || parameters.noBuffering(), parameters.rollingWindowSize(),
logFile)) {
try {
new DefaultClient(parameters).execute(output, args);
} catch (DaemonException.InterruptedException e) {