Jar plugin loading refactor as generic ServerPlugin

Now that we have a fully pluggable ServerPlugin mechanism
with registered providers, there is no reason why the jar
plugins cannot be loaded using the same interface.

Removing all the custom code managing the jar plugins
and creating a new pre-defined JarPluginProvider.

NOTE: A limitation still exists on init-steps as they
can only be provided by jar plugins. This is due to
the fact that Gerrit init runs without having a fully
configured plugin loader and full set of Guice injectors.

Change-Id: I793570735376be3a40f3204af6e82820191caac6
This commit is contained in:
Luca Milanesio
2014-04-28 00:45:34 +01:00
parent 94007f6af7
commit 9faf177526
6 changed files with 216 additions and 141 deletions

View File

@@ -31,6 +31,8 @@ public class PluginModule extends LifecycleModule {
listener().to(PluginLoader.class);
DynamicSet.setOf(binder(), ServerPluginProvider.class);
DynamicSet.bind(binder(), ServerPluginProvider.class).to(
JarPluginProvider.class);
bind(UniversalServerPluginProvider.class);
}
}