Moved the System Bundle's hard coded export package declarations to the
config.properties file. Also added some more System Bundle exports for
the UPnP subproject.


git-svn-id: https://svn.apache.org/repos/asf/incubator/felix/trunk@393205 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/org.apache.felix.framework/src/main/java/org/apache/felix/framework/SystemBundle.java b/org.apache.felix.framework/src/main/java/org/apache/felix/framework/SystemBundle.java
index 32d56aa..dfe99e4 100644
--- a/org.apache.felix.framework/src/main/java/org/apache/felix/framework/SystemBundle.java
+++ b/org.apache.felix.framework/src/main/java/org/apache/felix/framework/SystemBundle.java
@@ -22,7 +22,8 @@
 import java.util.*;
 
 import org.apache.felix.framework.cache.SystemBundleArchive;
-import org.apache.felix.framework.searchpolicy.*;
+import org.apache.felix.framework.searchpolicy.R4Export;
+import org.apache.felix.framework.searchpolicy.R4Package;
 import org.apache.felix.framework.util.FelixConstants;
 import org.apache.felix.framework.util.StringMap;
 import org.apache.felix.moduleloader.IContentLoader;
@@ -68,7 +69,7 @@
         try
         {
             classPathPkgs = R4Package.parseImportOrExportHeader(
-                getFelix().getConfig().get(FelixConstants.FRAMEWORK_SYSTEMPACKAGES));
+                getFelix().getConfig().get(Constants.FRAMEWORK_SYSTEMPACKAGES));
         }
         catch (Exception ex)
         {
@@ -80,32 +81,12 @@
 
         // Now, create the list of standard framework exports for
         // the system bundle.
-        m_exports = new R4Export[classPathPkgs.length + 4];
-
-        m_exports[0] = new R4Export(
-            "org.osgi.framework",
-            new R4Directive[0],
-            new R4Attribute[] { new R4Attribute("version", "1.3.0", false) });
-
-        m_exports[1] = new R4Export(
-            "org.osgi.service.packageadmin",
-            new R4Directive[0],
-            new R4Attribute[] { new R4Attribute("version", "1.2.0", false) });
-
-        m_exports[2] = new R4Export(
-                "org.osgi.service.startlevel",
-                new R4Directive[0],
-                new R4Attribute[] { new R4Attribute("version", "1.0.0", false) });
-
-        m_exports[3] = new R4Export(
-                "org.osgi.service.url",
-                new R4Directive[0],
-                new R4Attribute[] { new R4Attribute("version", "1.0.0", false) });
+        m_exports = new R4Export[classPathPkgs.length];
 
         // Copy the class path exported packages.
         for (int i = 0; i < classPathPkgs.length; i++)
         {
-            m_exports[i + 4] = new R4Export(classPathPkgs[i]);
+            m_exports[i] = new R4Export(classPathPkgs[i]);
         }
 
         m_contentLoader = new SystemBundleContentLoader(getFelix().getLogger());
@@ -119,7 +100,7 @@
             }
 
             exportSB.append(m_exports[i].getName());
-            exportSB.append("; specification-version=\"");
+            exportSB.append("; version=\"");
             exportSB.append(m_exports[i].getVersion().toString());
             exportSB.append("\"");
         }
diff --git a/org.apache.felix.main/src/main/resources/config.properties b/org.apache.felix.main/src/main/resources/config.properties
index 0e7e0c6..15382a1 100644
--- a/org.apache.felix.main/src/main/resources/config.properties
+++ b/org.apache.felix.main/src/main/resources/config.properties
@@ -1,14 +1,22 @@
 #
 # Framework config properties.
 #
-org.osgi.framework.system.packages=javax.swing; \
+org.osgi.framework.system.packages=org.osgi.framework; version=1.3.0, \
+ org.osgi.service.packageadmin; version=1.2.0, \
+ org.osgi.service.startlevel; version=1.0.0, \
+ org.osgi.service.url; version=1.0.0, \
+ javax.swing; \
  javax.swing.plaf; \
  javax.swing.event; \
  javax.swing.table; \
  javax.swing.border; \
  javax.swing.tree; \
  javax.swing.text; \
- version=1.4
+ version=1.4, \
+ org.w3c.dom, \
+ org.xml.sax, \
+ javax.xml.parsers, \
+ javax.imageio
 org.osgi.framework.bootdelegation=sun.*,com.sun.*
 #felix.cache.profile=foo
 felix.auto.start.1= \