@Override
  public void connect(String _ignoredContextId, String _ignoredUrl) throws IOException {
    ArtifactRepository artifactRepository =
      myRepositorySystem.createArtifactRepository(myOriginalRepositoryId, myOriginalRepositoryUrl, null, null, null);

    final ArtifactRepository mirrorRepository = myWagonManager.getMirrorRepository(artifactRepository);
    String mirrorUrl = mirrorRepository.getUrl();
    String indexUrl = mirrorUrl + (mirrorUrl.endsWith("/") ? "" : "/") + ".index";
    Repository repository = new Repository(myOriginalRepositoryId, indexUrl);

    try {
      myWagon = myWagonManager.getWagon(repository);
      myWagon.addTransferListener(myListener);

      myWagon.connect(repository,
                      myWagonManager.getAuthenticationInfo(mirrorRepository.getId()),
                      myWagonManager.getProxy(mirrorRepository.getProtocol()));
    }
    catch (AuthenticationException e) {
      throw new IOException("Authentication exception connecting to " + repository, e);
    }
    catch (WagonException e) {
      throw new IOException("Wagon exception connecting to " + repository, e);
    }
  }
@Override
  public void connect(String _ignoredContextId, String _ignoredUrl)