File file = artifact.getFile();
try {
Kar kar = new Kar(file.toURI());
kar.extract(new File(system.getPath()), new File(workDirectory));
for (URI repoUri : kar.getFeatureRepos()) {
featuresService.removeRepository(repoUri);
featuresService.addRepository(repoUri);
}
} catch (Exception e) {
throw new RuntimeException("Could not install kar: " + artifact.toString() + "\n", e);
//buf.append("Could not install kar: ").append(artifact.toString()).append("\n");