/**
   * Mirror an absolute plugin, stored on an absolute url, regardless of remote filename, will
   * change local filename to be normalized
   *
   * @param pluginRef
   * @param site
   * @param request
   * @param mirrored
   * @return
   */
  private boolean mirrorAbsolutePlugin(
      PluginRef pluginRef, UpdateSite site, ResourceStoreRequest request, Set<String> mirrored) {
    try {
      // here we need to check the <archive> tags in the site, to find proper absoluteUrl
      Map<String, String> archives = site.getArchives();

      String absoluteUrl = archives.get(request.getRequestPath());

      if (absoluteUrl == null) {
        getLogger().warn("archive url not set for plugin " + request.getRequestPath());
        return false;
      }

      if (!new URI(absoluteUrl).isAbsolute()) {
        getLogger()
            .warn(
                "archive url ("
                    + absoluteUrl
                    + ") is not absolute for plugin "
                    + request.getRequestPath());
        return false;
      }

      mirrorAbsoluteItem(
          absoluteUrl.substring(0, absoluteUrl.lastIndexOf("/")),
          request,
          DEFAULT_PLUGINS_DIR,
          createResourceStoreRequest(pluginRef),
          mirrored);

      return true;
    } catch (URISyntaxException e) {
      getLogger().warn("archive url has illegal syntax for plugin " + request.getRequestPath(), e);
    } catch (StorageException e) {
      getLogger().warn("storage problem for plugin " + request.getRequestPath(), e);
    } catch (ItemNotFoundException e) {
      getLogger().warn("item not found for plugin " + request.getRequestPath(), e);
    }

    return false;
  }