code: private PluginDescriptor verifyPlugin( Plugin plugin, MavenProject project, Settings settings,
                                             ArtifactRepository localRepository )
          throws LifecycleExecutionException, PluginNotFoundException
      {
          PluginDescriptor pluginDescriptor;
          try
          {
              pluginDescriptor = pluginManager.verifyPlugin( plugin, project, settings, localRepository );
          }
          catch ( PluginManagerException e )
          {
              throw new LifecycleExecutionException( "Internal error in the plugin manager getting plugin '"
                  + plugin.getKey() + "': " + e.getMessage(), e );
          }
          catch ( PluginVersionResolutionException e )
          {
              throw new LifecycleExecutionException( e.getMessage(), e );
          }
          catch ( InvalidVersionSpecificationException e )
          {
              throw new LifecycleExecutionException( e.getMessage(), e );
          }
          catch ( InvalidPluginException e )
          {
              throw new LifecycleExecutionException( e.getMessage(), e );
          }
          catch ( ArtifactNotFoundException e )
          {
              throw new LifecycleExecutionException( e.getMessage(), e );
          }
          catch ( ArtifactResolutionException e )
          {
              throw new LifecycleExecutionException( e.getMessage(), e );
          }
          catch ( PluginVersionNotFoundException e )
          {
              throw new LifecycleExecutionException( e.getMessage(), e );
          }
          return pluginDescriptor;
      }
docs: Verify plugin.
  
  @param plugin the plugin
  @param project the project
  @param settings the settings
  @param localRepository the local repository
  @return the plugin descriptor
  @throws LifecycleExecutionException the lifecycle execution exception
  @throws PluginNotFoundException the plugin not found exception