private @NotNull List<RepositoryArtifactDescription> searchArchives(@NotNull String url, @NotNull RepositoryArtifactDescription template)
    throws IOException {
    final String packaging = StringUtil.notNullize(template.getPackaging());
    final ArrayList<RepositoryArtifactDescription> artifacts = new ArrayList<>();

    String className = template.getClassNames();
    final String searchString = className.endsWith("*") || className.endsWith("?") ? className : className + ".class";
    Url requestUrl = toUrl(url, "search/archive", "name=" + URLEncoder.encode(searchString.trim(), StandardCharsets.UTF_8));
    ArtifactoryModel.ArchiveResults results = gson.fromJson(
      HttpRequests.request(requestUrl)
        .productNameAsUserAgent().readString(),
      ArtifactoryModel.ArchiveResults.class
    );

    if (results != null && results.results != null) {
      for (ArtifactoryModel.ArchiveResult result : results.results) {
        for (String uri : result.archiveUris) {
          if (!uri.endsWith(packaging)) continue;
          artifacts.add(convertArtifactInfo(uri, url, result.entry));
        }
      }
    }

    return artifacts;
  }
private @NotNull List<RepositoryArtifactDescription> searchArchives(@NotNull String url, @NotNull RepositoryArtifactDescription template)