StringBuilder buf = new StringBuilder();
for (Artifact artifact: dependencies) {
if ("kar".equals(artifact.getType()) && "compile".equals(artifact.getScope())) {
File file = artifact.getFile();
try {
installer.install(file);
} catch (Exception e) {
buf.append("Could not install kar: ").append(artifact.toString()).append("\n");
buf.append(e.getMessage()).append("\n\n");
}
}