@ Override public void loadPlugins ( ) { log . debug ( "Lookup plugins in '{}'" , pluginsRoot ) ; // check for plugins root if ( Files . notExists ( pluginsRoot ) || ! Files . isDirectory ( pluginsRoot ) ) { log . warn ( "No '{}' root" , pluginsRoot ) ; return ; } // get all plugin paths from repository List < Path > pluginPaths = pluginRepository . getPluginPaths ( ) ; // check for no plugins if ( pluginPaths . isEmpty ( ) ) { log . info ( "No plugins" ) ; return ; } log . debug ( "Found {} possible plugins: {}" , pluginPaths . size ( ) , pluginPaths ) ; // load plugins from plugin paths for ( Path pluginPath : pluginPaths ) { try { loadPluginFromPath ( pluginPath ) ; } catch ( PluginException e ) { log . error ( e . getMessage ( ) , e ) ; } } // resolve plugins try { resolvePlugins ( ) ; } catch ( PluginException e ) { log . error ( e . getMessage ( ) , e ) ; } }
Load plugins .