protected Plugin lookupPlugin ( String key ) { List < Plugin > plugins = project . getBuildPlugins ( ) ; for ( Iterator < Plugin > iterator = plugins . iterator ( ) ; iterator . hasNext ( ) ; ) { Plugin plugin = iterator . next ( ) ; if ( key . equalsIgnoreCase ( plugin . getKey ( ) ) ) { return plugin ; } } return null ; }
Find plugin based on the plugin key . Returns null if plugin cannot be located .