Browse Source

Adds ability to configure plugin directory (#256)

pull/262/head
Michael Ruocco 6 years ago committed by Decebal Suiu
parent
commit
7d04557840
  1. 5
      pf4j/src/main/java/org/pf4j/DefaultPluginManager.java

5
pf4j/src/main/java/org/pf4j/DefaultPluginManager.java

@ -21,6 +21,7 @@ import org.slf4j.LoggerFactory;
import java.io.File; import java.io.File;
import java.nio.file.Path; import java.nio.file.Path;
import java.nio.file.Paths;
/** /**
* Default implementation of the {@link PluginManager} interface. * Default implementation of the {@link PluginManager} interface.
@ -78,7 +79,9 @@ public class DefaultPluginManager extends AbstractPluginManager {
@Override @Override
protected PluginStatusProvider createPluginStatusProvider() { protected PluginStatusProvider createPluginStatusProvider() {
return new DefaultPluginStatusProvider(getPluginsRoot()); String configDir = System.getProperty("pf4j.pluginsConfigDir");
Path configPath = configDir != null ? Paths.get(configDir) : getPluginsRoot();
return new DefaultPluginStatusProvider(configPath);
} }
@Override @Override

Loading…
Cancel
Save