432321 - jetty-start / Allow defining extra start directories for common configurations

+ Adding Config Search order output to --list-config
This commit is contained in:
Joakim Erdfelt 2014-04-15 13:40:16 -07:00
parent dc3362ba3c
commit e5314d4a3e
2 changed files with 25 additions and 4 deletions

View File

@ -307,7 +307,7 @@ public class Main
public void listConfig(StartArgs args)
{
// Dump Jetty Home / Base
args.dumpEnvironment();
args.dumpEnvironment(baseHome);
// Dump JVM Args
args.dumpJvmArgs();

View File

@ -37,6 +37,7 @@ import java.util.StringTokenizer;
import org.eclipse.jetty.start.Props.Prop;
import org.eclipse.jetty.start.config.ConfigSource;
import org.eclipse.jetty.start.config.ConfigSources;
import org.eclipse.jetty.start.config.DirConfigSource;
/**
* The Arguments required to start Jetty.
@ -166,7 +167,7 @@ public class StartArgs
}
}
public void dumpEnvironment()
public void dumpEnvironment(BaseHome baseHome)
{
// Java Details
System.out.println();
@ -188,10 +189,30 @@ public class StartArgs
System.out.println();
System.out.println("Jetty Environment:");
System.out.println("-----------------");
dumpProperty("jetty.version");
dumpProperty("jetty.home");
dumpProperty("jetty.base");
dumpProperty("jetty.version");
// Jetty Configuration Environment
System.out.println();
System.out.println("Config Search Order:");
System.out.println("--------------------");
for (ConfigSource config : baseHome.getConfigSources())
{
System.out.printf(" %s",config.getId());
if (config instanceof DirConfigSource)
{
DirConfigSource dirsource = (DirConfigSource)config;
if (dirsource.isPropertyBased())
{
System.out.printf(" -> %s",dirsource.getDir());
}
}
System.out.println();
}
// Jetty Se
System.out.println();
}
public void dumpJvmArgs()