use of org.eclipse.tycho.p2.tools.verifier.facade.VerifierService in project tycho by eclipse.
the class VerifyIntegrityRepositoryMojo method execute.
@Override
public void execute() throws MojoExecutionException, MojoFailureException {
File repositoryDir = getBuildDirectory().getChild("repository");
logger.info("Verifying p2 repositories in " + repositoryDir);
VerifierService verifier = p2.getService(VerifierService.class);
URI repositoryUri = repositoryDir.toURI();
try {
if (!verifier.verify(repositoryUri, repositoryUri, getBuildDirectory())) {
throw new MojoFailureException("The repository is invalid.");
}
} catch (FacadeException e) {
throw new MojoExecutionException("Verification failed", e);
}
}
Aggregations