ExamBundlesStartLevel examBundlesStartLevel = system.getSingleOption(ExamBundlesStartLevel.class);
if (examBundlesStartLevel != null) {
startLevel = examBundlesStartLevel.getStartLevel();
}
ExamFeaturesFile examFeaturesFile;
if (framework.isUseDeployFolder()) {
copyReferencedArtifactsToDeployFolder(deploy, subsystem, fileEndings);
examFeaturesFile = ExamFeaturesFileFactory.createExamFeaturesFile("", startLevel);
} else {
StringBuilder extension = extractExtensionString(subsystem);
examFeaturesFile = ExamFeaturesFileFactory.createExamFeaturesFile(extension.toString(), startLevel);
}
examFeaturesFile.writeToFile(featuresXmlFile);
examFeaturesFile.adaptDistributionToStartExam(karafHome, featuresXmlFile);
long startedAt = System.currentTimeMillis();
runner.exec(environment, karafBase, javaHome.toString(), javaOpts.toArray(new String[]{}),
javaEndorsedDirs, javaExtDirs, karafHome.toString(), karafData, karafOpts,