public static List<MavenRemoteRepository> convertRepositories(List<? extends Repository> repositories) {
    if (repositories == null) return new ArrayList<MavenRemoteRepository>();

    List<MavenRemoteRepository> result = new ArrayList<MavenRemoteRepository>(repositories.size());
    for (Repository each : repositories) {
      result.add(new MavenRemoteRepository(each.getId(),
                                           each.getName(),
                                           each.getUrl(),
                                           each.getLayout(),
                                           convertPolicy(each.getReleases()),
                                           convertPolicy(each.getSnapshots())));
    }
    return result;
  }
public static List<MavenRemoteRepository> convertRepositories(List<? extends Repository> repositories)