private void loadDelayedPlugins ( ) { while ( ! delayedLoadPlugins . isEmpty ( ) ) { GrailsPlugin plugin = delayedLoadPlugins . remove ( 0 ) ; if ( areDependenciesResolved ( plugin ) ) { if ( ! hasValidPluginsToLoadBefore ( plugin ) ) { registerPlugin ( plugin ) ; } else { delayedLoadPlugins . add ( plugin ) ; } } else { // ok, it still hasn't resolved the dependency after the initial // load of all plugins. All hope is not lost, however, so lets first // look inside the remaining delayed loads before giving up boolean foundInDelayed = false ; for ( GrailsPlugin remainingPlugin : delayedLoadPlugins ) { if ( isDependentOn ( plugin , remainingPlugin ) ) { foundInDelayed = true ; break ; } } if ( foundInDelayed ) { delayedLoadPlugins . add ( plugin ) ; } else { failedPlugins . put ( plugin . getName ( ) , plugin ) ; LOG . error ( "ERROR: Plugin [" + plugin . getName ( ) + "] cannot be loaded because its dependencies [" + DefaultGroovyMethods . inspect ( plugin . getDependencyNames ( ) ) + "] cannot be resolved" ) ; } } } }
This method will attempt to load that plug - ins not loaded in the first pass