use of com.redhat.ceylon.cmr.impl.InvalidArchiveException in project ceylon-compiler by ceylon.
the class CeylonEnter method addOutputModuleToClassPath.
public void addOutputModuleToClassPath(Module module) {
RepositoryManager repositoryManager = fileManager.getOutputRepositoryManager();
ArtifactResult artifact = null;
try {
ArtifactContext ctx = new ArtifactContext(module.getNameAsString(), module.getVersion(), ArtifactContext.CAR, ArtifactContext.JAR);
artifact = repositoryManager.getArtifactResult(ctx);
} catch (InvalidArchiveException e) {
log.error("ceylon", "Module car " + e.getPath() + " obtained from repository " + e.getRepository() + " has an invalid SHA1 signature: you need to remove it and rebuild the archive, since it" + " may be corrupted.");
} catch (Exception e) {
String moduleName = module.getNameAsString();
if (!module.isDefault())
moduleName += "/" + module.getVersion();
log.error("ceylon", "Exception occured while trying to resolve module " + moduleName);
e.printStackTrace();
}
addModuleToClassPath(module, false, artifact);
}
Aggregations