From 45d5bd2cae448d83cd174f6002095548675cd108 Mon Sep 17 00:00:00 2001 From: Greg Wilkins Date: Tue, 21 Aug 2018 12:19:11 +1000 Subject: [PATCH] Issue #2719 --list-config shows properties from files Signed-off-by: Greg Wilkins --- .../org/eclipse/jetty/start/StartArgs.java | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/jetty-start/src/main/java/org/eclipse/jetty/start/StartArgs.java b/jetty-start/src/main/java/org/eclipse/jetty/start/StartArgs.java index e9bffd67f66..89eeebf0a79 100644 --- a/jetty-start/src/main/java/org/eclipse/jetty/start/StartArgs.java +++ b/jetty-start/src/main/java/org/eclipse/jetty/start/StartArgs.java @@ -19,6 +19,7 @@ package org.eclipse.jetty.start; import java.io.File; +import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; @@ -347,6 +348,32 @@ public class StartArgs { dumpProperty(key); } + + for (Path path : propertyFiles) + { + String p = baseHome.toShortForm(path); + if (Files.isReadable(path)) + { + Properties props = new Properties(); + try + { + props.load(new FileInputStream(path.toFile())); + for (Object key : props.keySet()) + { + System.out.printf(" %s:%s = %s%n",p,key,props.getProperty(String.valueOf(key))); + } + } + catch (Throwable th) + { + System.out.printf(" %s NOT READABLE!%n",p); + } + } + else + { + + System.out.printf(" %s NOT READABLE!%n",p); + } + } } private void dumpProperty(String key)