mirror of
https://github.com/jetty/jetty.project.git
synced 2025-03-01 11:29:29 +00:00
Issue #2719 --list-config shows properties from files
Signed-off-by: Greg Wilkins <gregw@webtide.com>
This commit is contained in:
parent
dbe340a20e
commit
45d5bd2cae
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user