@Override
  public @Nullable String findSourceJar(final @NotNull ProgressIndicator indicator,
                                        @NotNull String artifactId,
                                        @NotNull String version,
                                        @NotNull VirtualFile classesJar)
    throws SourceSearchException {
    try {
      indicator.setIndeterminate(true);
      indicator.setText(IdeCoreBundle.message("progress.message.connecting.to", "https://oss.sonatype.org"));

      indicator.checkCanceled();

      String url = "https://oss.sonatype.org/service/local/lucene/search?collapseresults=true&c=sources&a=" + artifactId + "&v=" + version;
      String groupId = findMavenGroupId(classesJar, artifactId);
      if(groupId != null) {
        url += ("&g=" + groupId);
      }

      List<Element> artifactList = findElements("./data/artifact", readElementCancelable(indicator, url));
      if (artifactList.isEmpty()) {
        return null;
      }

      Element element;
      if (artifactList.size() == 1) {
        element = artifactList.get(0);
      }
      else {
        // TODO handle
        return null;
      }

      List<Element> artifactHintList = findElements("artifactHits/artifactHit/artifactLinks/artifactLink/classifier[text()='sources']/../../..", element);
      if (artifactHintList.isEmpty()) {
        return null;
      }

      groupId = element.getChildTextTrim("groupId");
      String repositoryId = artifactHintList.get(0).getChildTextTrim("repositoryId");

      return "https://oss.sonatype.org/service/local/artifact/maven/redirect?r=" +
                           repositoryId + "&g=" +
                           groupId + "&a=" +
                           artifactId + "&v=" +
                           version + "&e=jar&c=sources";
    }
    catch (IOException e) {
      indicator.checkCanceled(); // Cause of IOException may be canceling of operation.

      LOG.warn(e);
      throw new SourceSearchException("Connection problem. See log for more details.");
    }
  }
@Override
  public @Nullable String findSourceJar(final @NotNull ProgressIndicator indicator,
                                        @NotNull String artifactId,
                                        @NotNull String version,
                                        @NotNull VirtualFile classesJar)