Issue #2719 --list-config shows properties from files

Signed-off-by: Greg Wilkins <gregw@webtide.com>
This commit is contained in:
Greg Wilkins 2018-08-21 12:19:11 +10:00
parent dbe340a20e
commit 45d5bd2cae
1 changed files with 27 additions and 0 deletions

View File

@ -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)