AccessToken token = ApplicationManager.getApplication().acquireReadActionLock();
try {
Set<SelectedBundle> selectedBundles = new HashSet<SelectedBundle>();
// the bundles are module names, by now we try to find jar files in the output directory which we can then install
ModuleManager moduleManager = ModuleManager.getInstance(myRunConfiguration.getProject());
int bundleCount = myRunConfiguration.getBundlesToDeploy().size();
for (int i = 0; i < bundleCount; i++) {
progressIndicator.setFraction((double)i / bundleCount);
SelectedBundle selectedBundle = myRunConfiguration.getBundlesToDeploy().get(i);
if (selectedBundle.isModule()) {
// use the output jar name if it is a module
String name = selectedBundle.getName();
Module module = moduleManager.findModuleByName(name);
if (module == null) {
throw new CantRunException("Module '" + name + "' no longer exists. Please check your run configuration.");
}
OsmorcFacet facet = OsmorcFacet.getInstance(module);
if (facet == null) {