From: Decebal Suiu Date: Tue, 12 Mar 2019 18:28:47 +0000 (+0200) Subject: Resolve #294 X-Git-Tag: release-3.0.0~2^2~53 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=4eeaf8ab558da4a6974e4cb5deccc57c32d620f9;p=pf4j.git Resolve #294 --- diff --git a/pf4j/src/main/java/org/pf4j/DefaultPluginManager.java b/pf4j/src/main/java/org/pf4j/DefaultPluginManager.java index 96a4104..7e90388 100644 --- a/pf4j/src/main/java/org/pf4j/DefaultPluginManager.java +++ b/pf4j/src/main/java/org/pf4j/DefaultPluginManager.java @@ -89,15 +89,15 @@ public class DefaultPluginManager extends AbstractPluginManager { @Override protected PluginRepository createPluginRepository() { return new CompoundPluginRepository() - .add(new DefaultPluginRepository(getPluginsRoot(), isDevelopment())) - .add(new JarPluginRepository(getPluginsRoot())); + .add(new JarPluginRepository(getPluginsRoot())) + .add(new DefaultPluginRepository(getPluginsRoot(), isDevelopment())); } @Override protected PluginLoader createPluginLoader() { return new CompoundPluginLoader() - .add(new DefaultPluginLoader(this, pluginClasspath)) - .add(new JarPluginLoader(this)); + .add(new JarPluginLoader(this)) + .add(new DefaultPluginLoader(this, pluginClasspath)); } @Override diff --git a/pf4j/src/test/java/org/pf4j/LoadPluginsTest.java b/pf4j/src/test/java/org/pf4j/LoadPluginsTest.java index c2917e8..46980bc 100644 --- a/pf4j/src/test/java/org/pf4j/LoadPluginsTest.java +++ b/pf4j/src/test/java/org/pf4j/LoadPluginsTest.java @@ -45,7 +45,19 @@ public class LoadPluginsTest { @Before public void setUp() { - pluginManager = new DefaultPluginManager(pluginsFolder.getRoot().toPath()); + pluginManager = new DefaultPluginManager(pluginsFolder.getRoot().toPath()) { + + @Override + protected PluginRepository createPluginRepository() { + return new DefaultPluginRepository(getPluginsRoot(), isDevelopment()); + } + + @Override + protected PluginLoader createPluginLoader() { + return new DefaultPluginLoader(this, pluginClasspath); + } + + }; } @Test