Improve JavaScript launch
[lgpl/argeo-commons.git] / org.argeo.osgi.boot / src / org / argeo / osgi / boot / OsgiBuilder.java
index 28a2604a42c6c3fc6766b81ff5a94370b07d4ae8..8c460e1161e6cdba0cfe86b59594003e382a64d4 100644 (file)
@@ -63,12 +63,15 @@ public class OsgiBuilder {
                        OsgiBootUtils.debug("OSGi starting - data: " + osgiData + " conf: " + osgiConf);
 
                OsgiBoot osgiBoot = new OsgiBoot(framework.getBundleContext());
-               // install bundles
-               for (String distributionBundle : distributionBundles) {
-                       List<String> bundleUrls = osgiBoot.getDistributionUrls(distributionBundle, baseUrl);
-                       osgiBoot.installUrls(bundleUrls);
+               if (distributionBundles.isEmpty()) {
+                       osgiBoot.getProvisioningManager().install(null);
+               } else {
+                       // install bundles
+                       for (String distributionBundle : distributionBundles) {
+                               List<String> bundleUrls = osgiBoot.getDistributionUrls(distributionBundle, baseUrl);
+                               osgiBoot.installUrls(bundleUrls);
+                       }
                }
-
                // start bundles
                osgiBoot.startBundles(startLevelsToProperties());