Browse Source

Resolve #294

tags/release-3.0.0
Decebal Suiu 5 years ago
parent
commit
4eeaf8ab55

+ 4
- 4
pf4j/src/main/java/org/pf4j/DefaultPluginManager.java View File

@@ -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

+ 13
- 1
pf4j/src/test/java/org/pf4j/LoadPluginsTest.java View File

@@ -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