use of org.eclipse.tycho.core.shared.MavenLogger in project tycho by eclipse.
the class VerifierServiceImpl method verify.
@Override
public boolean verify(URI metadataRepositoryUri, URI artifactRepositoryUri, BuildOutputDirectory tempDirectory) throws FacadeException {
MavenLogger logger = mavenContext.getLogger();
logger.debug("Checking metadata from '" + metadataRepositoryUri + "' and artifacts from '" + artifactRepositoryUri + "'");
IProvisioningAgent agent = Activator.createProvisioningAgent(tempDirectory);
try {
try {
final IMetadataRepository metadata = loadMetadataRepository(metadataRepositoryUri, agent);
final IArtifactRepository artifactRepository = loadArtifactRepository(artifactRepositoryUri, agent);
boolean valid = true;
valid &= verifyReferencedArtifactsExist(metadata, artifactRepository, logger);
valid &= verifyAllArtifactContent(artifactRepository, logger);
if (valid) {
logger.info("The integrity of the metadata repository '" + metadataRepositoryUri + "' and artifact repository '" + artifactRepositoryUri + "' has been verified successfully");
}
return valid;
} catch (ProvisionException e) {
throw new FacadeException(e);
}
} finally {
agent.stop();
}
}
Aggregations