Decebal Suiu 6 years ago
parent
commit
4eeaf8ab55
  1. 8
      pf4j/src/main/java/org/pf4j/DefaultPluginManager.java
  2. 14
      pf4j/src/test/java/org/pf4j/LoadPluginsTest.java

8
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

14
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

Loading…
Cancel
Save