class ProjectUtils {

    private ProjectUtils() {}

    public static List<ArtifactRepository> buildArtifactRepositories(
            List<Repository> repositories, ArtifactRepositoryFactory artifactRepositoryFactory, PlexusContainer c)
            throws InvalidRepositoryException {

        List<ArtifactRepository> remoteRepositories = new ArrayList<>();

        for (Repository r : repositories) {
            remoteRepositories.add(buildArtifactRepository(r, artifactRepositoryFactory, c));
        }

        return remoteRepositories;
    }

    public static ArtifactRepository buildDeploymentArtifactRepository(
            DeploymentRepository repo, ArtifactRepositoryFactory artifactRepositoryFactory, PlexusContainer c)
            throws InvalidRepositoryException {
        return buildArtifactRepository(repo, artifactRepositoryFactory, c);
    }

    public static ArtifactRepository buildArtifactRepository(
            Repository repo, ArtifactRepositoryFactory artifactRepositoryFactory, PlexusContainer c)
            throws InvalidRepositoryException {<FILL_FUNCTION_BODY>}

    private static RepositorySystem rs(PlexusContainer c) {
        try {
            return c.lookup(RepositorySystem.class);
        } catch (ComponentLookupException e) {
            throw new IllegalStateException(e);
        }
    }

    private static RepositorySystemSession rss(PlexusContainer c) {
        try {
            LegacySupport legacySupport = c.lookup(LegacySupport.class);

            return legacySupport.getRepositorySession();
        } catch (ComponentLookupException e) {
            throw new IllegalStateException(e);
        }
    }
}

        RepositorySystem repositorySystem = rs(c);
        RepositorySystemSession session = rss(c);

        ArtifactRepository repository = repositorySystem.buildArtifactRepository(repo);

        if (session != null) {
            repositorySystem.injectMirror(session, Arrays.asList(repository));
            repositorySystem.injectProxy(session, Arrays.asList(repository));
            repositorySystem.injectAuthentication(session, Arrays.asList(repository));
        }

        return repository;
    
<no_super_class>