public static void main(String[] args) {
try {
// pre-parse parsing... These are the flags
// that must be dealt with before we parse the flags.
CmdLineFlags cmdLineFlags = new CmdLineFlagsFactory().create(args);
List<Plugin> cmdLinePlugins = cmdLineFlags.getPlugins();
// configure logging before we start seriously processing.
LogManager.getLogManager().readConfiguration(cmdLineFlags.getRunnerMode().getLogConfig());
final PluginLoader pluginLoader = new PluginLoader();
// load all the command line plugins.
final List<Module> pluginModules = pluginLoader.load(cmdLinePlugins);
logger.debug("loaded plugins %s", pluginModules);
JsTestDriverBuilder builder = new JsTestDriverBuilder();
builder.addBasePaths(cmdLineFlags.getBasePath());
builder.setConfigurationSource(cmdLineFlags.getConfigurationSource());
builder.addPluginModules(pluginModules);
builder.withPluginInitializer(TestResultPrintingInitializer.class);
builder.setRunnerMode(cmdLineFlags.getRunnerMode());
builder.setFlags(cmdLineFlags.getUnusedFlagsAsArgs());
JsTestDriver jstd = builder.build();
jstd.runConfiguration();
logger.info("Finished action run.");
} catch (InvalidFlagException e) {