List<MavenRemoteRepository> (List<? extends ArtifactRepository> repositories) { if (repositories == null) return new ArrayList<MavenRemoteRepository>(); List<MavenRemoteRepository> result = new ArrayList<MavenRemoteRepository>(repositories.size()); for (ArtifactRepository each : repositories) { result.add(new MavenRemoteRepository(each.getId(), each.getId(), each.getUrl(), each.getLayout() != null ? each.getLayout().getId() : "default", convertPolicy(each.getReleases()), convertPolicy(each.getSnapshots()))); } return result; }