diff --git a/core.netigso/src/org/netbeans/core/netigso/Netigso.java b/core.netigso/src/org/netbeans/core/netigso/Netigso.java --- a/core.netigso/src/org/netbeans/core/netigso/Netigso.java +++ b/core.netigso/src/org/netbeans/core/netigso/Netigso.java @@ -141,11 +141,14 @@ readBundles(); Map configMap = new HashMap(); + injectSystemProperties(configMap); // ensure we read system properties final String cache = getNetigsoCache().getPath(); configMap.put(Constants.FRAMEWORK_STORAGE, cache); activator = new NetigsoActivator(this); configMap.put("netigso.archive", NetigsoArchiveFactory.DEFAULT.create(this)); // NOI18N - configMap.put("felix.log.level", "4"); // NOI18N + if (!configMap.containsKey("felix.log.level")) { + configMap.put("felix.log.level", "4"); // allow others to set log level + } configMap.put("felix.bootdelegation.classloaders", activator); // NOI18N String startLevel = FRAMEWORK_START_LEVEL(); if (!startLevel.isEmpty()) { @@ -190,6 +193,17 @@ } } + private void injectSystemProperties(Map configProps) { + for (Enumeration e = System.getProperties().propertyNames(); e.hasMoreElements(); ) + { + String key = e.nextElement().toString(); + if (key.startsWith("felix.") || key.startsWith("org.osgi.framework.")) + { + configProps.put(key, System.getProperty(key)); + } + } + } + private static Set toActivate(Framework f, Collection allModules) { ServiceReference sr = f.getBundleContext().getServiceReference("org.osgi.service.packageadmin.PackageAdmin"); // NOI18N if (sr == null) {