if (artifact.getScope().equals("compile") || artifact.getScope().equals("runtime")) {
if (artifact.getType().equals("kar")) {
File karFile = artifact.getFile();
getLog().info("Extracting " + artifact.toString() + " kar");
try {
Kar kar = new Kar(karFile.toURI());
kar.extract(new File(system.getPath()), new File(workDirectory));
for (URI repositoryUri : kar.getFeatureRepos()) {
resolveRepository(repositoryUri.getPath(), repositories, features, false, addToStartup);
}
} catch (Exception e) {
throw new RuntimeException("Can not install " + artifact.toString() + " kar", e);
}