private Map prepareAvatars()

in src/main/java/org/apache/maven/report/projectinfo/TeamReport.java [128:149]


    private Map<Contributor, String> prepareAvatars() throws MavenReportException {

        if (!showAvatarImages) {
            return Collections.emptyMap();
        }

        AvatarsProvider avatarsProvider = avatarsProviders.get(avatarProviderName);
        if (avatarsProvider == null) {
            throw new MavenReportException("No AvatarsProvider found for name " + avatarProviderName);
        }
        avatarsProvider.setBaseUrl(avatarBaseUrl);
        avatarsProvider.setOutputDirectory(getReportOutputDirectory());

        Map<Contributor, String> result = new HashMap<>();
        try {
            prepareContributorAvatars(result, avatarsProvider, project.getDevelopers());
            prepareContributorAvatars(result, avatarsProvider, project.getContributors());
        } catch (IOException e) {
            throw new MavenReportException("Unable to load avatar images", e);
        }
        return result;
    }