Option to start headless Gerrit daemon

Add --headless option to the Daemon which will start Gerrit daemon
without the Web UI front end (headless mode).

This may be useful for running Gerrit server with an alternative (rest
based) UI or when starting Gerrit server for the purpose of automated
REST/SSH based testing.

Currently this option is only supported via the --headless option of the
daemon program. We would need to introduce a config option in order to
support this feature for deployed war mode.

Change-Id: If45d34dadbcc9c807132ca6c5901aba26d094158
Signed-off-by: Sasa Zivkov <sasa.zivkov@sap.com>
This commit is contained in:
Sasa Zivkov
2013-01-30 12:50:28 +01:00
parent f2ed5a5c9b
commit eed56714e0
5 changed files with 60 additions and 6 deletions

View File

@@ -18,6 +18,7 @@ import static com.google.inject.Scopes.SINGLETON;
import static com.google.inject.Stage.PRODUCTION;
import com.google.gerrit.common.ChangeHookRunner;
import com.google.gerrit.httpd.GerritUiOptions;
import com.google.gerrit.httpd.auth.openid.OpenIdModule;
import com.google.gerrit.httpd.plugins.HttpPluginModule;
import com.google.gerrit.lifecycle.LifecycleManager;
@@ -241,6 +242,12 @@ public class WebAppInitializer extends GuiceServletContextListener {
});
modules.add(SshKeyCacheImpl.module());
modules.add(new MasterNodeStartup());
modules.add(new AbstractModule() {
@Override
protected void configure() {
bind(GerritUiOptions.class).toInstance(new GerritUiOptions(false));
}
});
return cfgInjector.createChildInjector(modules);
}