    private PluginDescriptor getPluginDescriptor(String groupId, String artifactId, String version) {
      String name = groupId + ":" + artifactId + ":" + version;
      PluginDescriptor descriptor = descriptors.get(name);
      if(descriptor!=null) {
        return descriptor;
      }
      MavenPlugin plugin = MavenPlugin.getDefault();
      MavenConsole console = plugin.getConsole();
      try {
        IMaven embedder = MavenPlugin.lookup(IMaven.class);
        IndexManager indexManager = MavenPlugin.getDefault().getIndexManager();
        List<ArtifactRepository> repositories = indexManager.getArtifactRepositories(null, null);
        Artifact artifact = embedder.resolve(groupId, artifactId, version, null, "maven-plugin", repositories, null);
        File file = artifact.getFile();
        if(file == null) {
          String msg = "Can't resolve plugin " + name;
          console.logError(msg);
        } else {
          InputStream is = null;
          ZipFile zf = null;
          try {
            zf = new ZipFile(file);
            ZipEntry entry = zf.getEntry("META-INF/maven/plugin.xml");
            if(entry != null) {
              is = zf.getInputStream(entry);
              PluginDescriptorBuilder builder = new PluginDescriptorBuilder();
              descriptor = builder.build(new InputStreamReader(is));
              descriptors.put(name, descriptor);
              return descriptor;
            }
          } catch(Exception ex) {
            String msg = "Can't read configuration for " + name;
            console.logError(msg);
            MavenLogger.log(msg, ex);
          } finally {
            IOUtil.close(is);
            try {
              zf.close();
            } catch(IOException ex) {
            }
          }
        }
      } catch(CoreException ex) {
        IStatus status = ex.getStatus();
        console.logError(status.getMessage() + "; " + status.getException().getMessage());
        MavenLogger.log(ex);
      }
      return null;
    }

    private PluginDescriptor getPluginDescriptor(String groupId, String artifactId, String version) {
      String name = groupId + ":" + artifactId + ":" + version;
      PluginDescriptor descriptor = descriptors.get(name);
      if(descriptor!=null) {
        return descriptor;
      }
      MavenPlugin plugin = MavenPlugin.getDefault();
      MavenConsole console = plugin.getConsole();
      try {
        IMaven embedder = MavenPlugin.lookup(IMaven.class);
        IndexManager indexManager = MavenPlugin.getDefault().getIndexManager();
        List<ArtifactRepository> repositories = indexManager.getArtifactRepositories(null, null);
        Artifact artifact = embedder.resolve(groupId, artifactId, version, "maven-plugin", null,  repositories, null);
        File file = artifact.getFile();
        if(file == null) {
          String msg = "Can't resolve plugin " + name;
          console.logError(msg);
        } else {
          InputStream is = null;
          ZipFile zf = null;
          try {
            zf = new ZipFile(file);
            ZipEntry entry = zf.getEntry("META-INF/maven/plugin.xml");
            if(entry != null) {
              is = zf.getInputStream(entry);
              PluginDescriptorBuilder builder = new PluginDescriptorBuilder();
              descriptor = builder.build(new InputStreamReader(is));
              descriptors.put(name, descriptor);
              return descriptor;
            }
          } catch(Exception ex) {
            String msg = "Can't read configuration for " + name;
            console.logError(msg);
            MavenLogger.log(msg, ex);
          } finally {
            IOUtil.close(is);
            try {
              zf.close();
            } catch(IOException ex) {
            }
          }
        }
      } catch(CoreException ex) {
        IStatus status = ex.getStatus();
        console.logError(status.getMessage() + "; " + status.getException().getMessage());
        MavenLogger.log(ex);
      }
      return null;
    }
