All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.bazaarvoice.maven.plugin.s3repo.create.RepoStatistics Maven / Gradle / Ivy

There is a newer version: 3.7
Show newest version
package com.bazaarvoice.maven.plugin.s3repo.create;

import org.apache.maven.plugin.MojoExecutionException;


public class RepoStatistics {
    static RepoStatistics createRepoStatisticsFromCreateOrUpdateContext(CreateOrUpdateContext context) throws MojoExecutionException {
        if (context.getLocalYumRepo().isRepoDataExists()) {
            return new RepoStatistics(context.getLocalYumRepo().parseFileListFromRepoMetadata().size());
        } else {
            return new RepoStatistics(0);
        }
    }

    private final int numPackages;

    private RepoStatistics(final int numPackages) {
        this.numPackages = numPackages;
    }

    public int getNumPackages() {
        return numPackages;
    }
}





© 2015 - 2025 Weber Informatics LLC | Privacy Policy