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 @Override
protected PluginRepository createPluginRepository() { protected PluginRepository createPluginRepository() {
return new CompoundPluginRepository() return new CompoundPluginRepository()
.add(new DefaultPluginRepository(getPluginsRoot(), isDevelopment())) .add(new JarPluginRepository(getPluginsRoot()))
.add(new JarPluginRepository(getPluginsRoot())); .add(new DefaultPluginRepository(getPluginsRoot(), isDevelopment()));
} }
@Override @Override
protected PluginLoader createPluginLoader() { protected PluginLoader createPluginLoader() {
return new CompoundPluginLoader() return new CompoundPluginLoader()
.add(new DefaultPluginLoader(this, pluginClasspath)) .add(new JarPluginLoader(this))
.add(new JarPluginLoader(this)); .add(new DefaultPluginLoader(this, pluginClasspath));
} }
@Override @Override

14
pf4j/src/test/java/org/pf4j/LoadPluginsTest.java

@ -45,7 +45,19 @@ public class LoadPluginsTest {
@Before @Before
public void setUp() { 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 @Test

Loading…
Cancel
Save