Skip to content

Commit

Permalink
A new daemon is always started on Java 8 apache#266 apache#260 apache…
Browse files Browse the repository at this point in the history
  • Loading branch information
ppalaga committed Dec 15, 2020
1 parent 603190f commit afcc67e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
Expand Up @@ -328,6 +328,7 @@ private Process startDaemon(String uid) {
}

Environment.MVND_HOME.addCommandLineOption(args, mvndHome.toString());
Environment.MVND_JAVA_HOME.addCommandLineOption(args, parameters.javaHome().toString());
Environment.LOGBACK_CONFIGURATION_FILE
.addCommandLineOption(args, parameters.logbackConfigurationPath().toString());
Environment.MVND_UID.addCommandLineOption(args, uid);
Expand Down
Expand Up @@ -224,7 +224,12 @@ public enum Environment {
/**
* Internal property to tell the daemon the width of the terminal
*/
MVND_TERMINAL_WIDTH("mvnd.terminalWidth", null, 0, OptionType.INTEGER, Flags.INTERNAL);
MVND_TERMINAL_WIDTH("mvnd.terminalWidth", null, 0, OptionType.INTEGER, Flags.INTERNAL),
/**
* Internal property to tell the daemon which JAVA_HOME was used to start it. It needs to be passed explicitly
* because the value may differ from what the daemon sees through <code>System.getProperty("java.home")</code>.
*/
MVND_JAVA_HOME("mvnd.java.home", null, null, OptionType.PATH, Flags.INTERNAL);

static Properties properties;

Expand Down
2 changes: 1 addition & 1 deletion daemon/src/main/java/org/mvndaemon/mvnd/daemon/Server.java
Expand Up @@ -129,7 +129,7 @@ public Server() throws IOException {
}
long cur = System.currentTimeMillis();
info = new DaemonInfo(uid,
Environment.JAVA_HOME.asString(),
Environment.MVND_JAVA_HOME.asString(),
Environment.MVND_HOME.asString(),
DaemonRegistry.getProcessId(),
socket.socket().getLocalPort(),
Expand Down

0 comments on commit afcc67e

Please sign in to comment.