ModuleSpec.Builder specBuilder = ModuleSpec.build(ModuleIdentifier.create(Constants.JBOSGI_PREFIX + ".framework"));
specBuilder.addDependency(DependencySpec.createModuleDependencySpec(PathFilters.acceptAll(), PathFilters.acceptAll(), osgiLoader, systemIdentifier, false));
// Add a dependency on the default framework module
ModuleIdentifier frameworkIdentifier = ModuleIdentifier.create("org.jboss.osgi.framework");
DependencySpec moduleDep = DependencySpec.createModuleDependencySpec(PathFilters.acceptAll(), PathFilters.acceptAll(), systemLoader, frameworkIdentifier, false);
specBuilder.addDependency(moduleDep);
// Add the user defined module dependencies
String modulesProps = (String) getBundleManager().getProperty(SubsystemState.PROP_JBOSS_OSGI_SYSTEM_MODULES);
if (modulesProps != null) {