protected PluginRelease findReleaseForPlugin ( String id , String version ) throws PluginException { PluginInfo pluginInfo = getPluginsMap ( ) . get ( id ) ; if ( pluginInfo == null ) { log . info ( "Plugin with id {} does not exist in any repository" , id ) ; throw new PluginException ( "Plugin with id {} not found in any repository" , id ) ; } if ( version == null ) { return getLastPluginRelease ( id ) ; } for ( PluginRelease release : pluginInfo . releases ) { if ( versionManager . compareVersions ( version , release . version ) == 0 && release . url != null ) { return release ; } } throw new PluginException ( "Plugin {} with version @{} does not exist in the repository" , id , version ) ; }
Resolves Release from id and version .