mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-15 09:46:16 +01:00
remove unused services and fix double plugin loading
This commit is contained in:
@@ -1 +0,0 @@
|
|||||||
sonia.scm.web.GitWebPlugin
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
sonia.scm.web.HgWebPlugin
|
|
||||||
@@ -18,7 +18,6 @@ import org.slf4j.Logger;
|
|||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import sonia.scm.repository.RepositoryManager;
|
import sonia.scm.repository.RepositoryManager;
|
||||||
import sonia.scm.util.ServiceUtil;
|
|
||||||
import sonia.scm.util.Util;
|
import sonia.scm.util.Util;
|
||||||
import sonia.scm.web.plugin.SCMPlugin;
|
import sonia.scm.web.plugin.SCMPlugin;
|
||||||
import sonia.scm.web.plugin.SCMPluginManager;
|
import sonia.scm.web.plugin.SCMPluginManager;
|
||||||
@@ -127,7 +126,7 @@ public class ContextListener extends GuiceServletContextListener
|
|||||||
{
|
{
|
||||||
List<Module> modules = new ArrayList<Module>();
|
List<Module> modules = new ArrayList<Module>();
|
||||||
|
|
||||||
modules.add(new ScmServletModule(webPluginContext));
|
modules.add(new ScmServletModule(pluginManager, webPluginContext));
|
||||||
|
|
||||||
Collection<Module> pluginModules = webPluginContext.getInjectModules();
|
Collection<Module> pluginModules = webPluginContext.getInjectModules();
|
||||||
|
|
||||||
|
|||||||
@@ -99,10 +99,14 @@ public class ScmServletModule extends ServletModule
|
|||||||
* Constructs ...
|
* Constructs ...
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
|
*
|
||||||
|
* @param pluginManager
|
||||||
* @param webPluginContext
|
* @param webPluginContext
|
||||||
*/
|
*/
|
||||||
ScmServletModule(ScmWebPluginContext webPluginContext)
|
ScmServletModule(SCMPluginManager pluginManager,
|
||||||
|
ScmWebPluginContext webPluginContext)
|
||||||
{
|
{
|
||||||
|
this.pluginManager = pluginManager;
|
||||||
this.webPluginContext = webPluginContext;
|
this.webPluginContext = webPluginContext;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -121,18 +125,6 @@ public class ScmServletModule extends ServletModule
|
|||||||
bind(EncryptionHandler.class).to(MessageDigestEncryptionHandler.class);
|
bind(EncryptionHandler.class).to(MessageDigestEncryptionHandler.class);
|
||||||
bind(Authenticator.class).to(XmlAuthenticator.class);
|
bind(Authenticator.class).to(XmlAuthenticator.class);
|
||||||
bind(SecurityContext.class).to(BasicSecurityContext.class);
|
bind(SecurityContext.class).to(BasicSecurityContext.class);
|
||||||
|
|
||||||
SCMPluginManager pluginManager = new SCMPluginManager();
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
pluginManager.load();
|
|
||||||
}
|
|
||||||
catch (IOException ex)
|
|
||||||
{
|
|
||||||
logger.error(ex.getMessage(), ex);
|
|
||||||
}
|
|
||||||
|
|
||||||
loadPlugins(pluginManager);
|
loadPlugins(pluginManager);
|
||||||
bind(CacheManager.class).to(EhCacheManager.class);
|
bind(CacheManager.class).to(EhCacheManager.class);
|
||||||
bind(RepositoryManager.class).annotatedWith(Undecorated.class).to(
|
bind(RepositoryManager.class).annotatedWith(Undecorated.class).to(
|
||||||
@@ -229,6 +221,9 @@ public class ScmServletModule extends ServletModule
|
|||||||
|
|
||||||
//~--- fields ---------------------------------------------------------------
|
//~--- fields ---------------------------------------------------------------
|
||||||
|
|
||||||
|
/** Field description */
|
||||||
|
private SCMPluginManager pluginManager;
|
||||||
|
|
||||||
/** Field description */
|
/** Field description */
|
||||||
private ScmWebPluginContext webPluginContext;
|
private ScmWebPluginContext webPluginContext;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user