mirror of
https://github.com/apache/maven-mvnd.git
synced 2025-09-24 21:35:15 +00:00
Display the java home of the daemon when using "mvnd --status"
This commit is contained in:
@@ -142,13 +142,14 @@ public class DefaultClient implements Client {
|
|||||||
try (DaemonRegistry registry = new DaemonRegistry(layout.registry())) {
|
try (DaemonRegistry registry = new DaemonRegistry(layout.registry())) {
|
||||||
boolean status = args.remove("--status");
|
boolean status = args.remove("--status");
|
||||||
if (status) {
|
if (status) {
|
||||||
output.accept(null, String.format(" %36s %7s %5s %7s %s",
|
output.accept(null, String.format(" %36s %7s %5s %7s %23s %s",
|
||||||
"UUID", "PID", "Port", "Status", "Last activity"));
|
"UUID", "PID", "Port", "Status", "Last activity", "Java home"));
|
||||||
registry.getAll().forEach(d -> output.accept(null, String.format(" %36s %7s %5s %7s %s",
|
registry.getAll().forEach(d -> output.accept(null, String.format(" %36s %7s %5s %7s %23s %s",
|
||||||
d.getUid(), d.getPid(), d.getAddress(), d.getState(),
|
d.getUid(), d.getPid(), d.getAddress(), d.getState(),
|
||||||
LocalDateTime.ofInstant(
|
LocalDateTime.ofInstant(
|
||||||
Instant.ofEpochMilli(Math.max(d.getLastIdle(), d.getLastBusy())),
|
Instant.ofEpochMilli(Math.max(d.getLastIdle(), d.getLastBusy())),
|
||||||
ZoneId.systemDefault()))));
|
ZoneId.systemDefault()),
|
||||||
|
d.getJavaHome())));
|
||||||
return new DefaultResult(argv, null);
|
return new DefaultResult(argv, null);
|
||||||
}
|
}
|
||||||
boolean stop = args.remove("--stop");
|
boolean stop = args.remove("--stop");
|
||||||
|
Reference in New Issue
Block a user