package org.pf4j.demo;
import org.apache.commons.lang.StringUtils;
+import org.pf4j.DefaultExtensionFinder;
import org.pf4j.DefaultPluginManager;
+import org.pf4j.ExtensionFinder;
import org.pf4j.PluginManager;
import org.pf4j.PluginWrapper;
import org.pf4j.demo.api.Greeting;
printLogo();
// create the plugin manager
- final PluginManager pluginManager = new DefaultPluginManager();
+ final PluginManager pluginManager = new DefaultPluginManager() {
+
+ protected ExtensionFinder createExtensionFinder() {
+ DefaultExtensionFinder extensionFinder = (DefaultExtensionFinder) super.createExtensionFinder();
+ extensionFinder.addServiceProviderExtensionFinder();
+
+ return extensionFinder;
+ }
+
+ };
+
// load the plugins
pluginManager.loadPlugins();