FELIX-1457: refactor features management layer

git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@801925 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/karaf/assembly/pom.xml b/karaf/assembly/pom.xml
index 333806b..84c6ebe 100644
--- a/karaf/assembly/pom.xml
+++ b/karaf/assembly/pom.xml
@@ -59,6 +59,18 @@
             <artifactId>org.apache.felix.karaf.deployer.features</artifactId>
         </dependency>
         <dependency>
+            <groupId>org.apache.felix.karaf.features</groupId>
+            <artifactId>org.apache.felix.karaf.features.core</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.felix.karaf.features</groupId>
+            <artifactId>org.apache.felix.karaf.features.command</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.felix.karaf.features</groupId>
+            <artifactId>org.apache.felix.karaf.features.management</artifactId>
+        </dependency>
+        <dependency>
             <groupId>org.apache.felix.karaf.gshell</groupId>
             <artifactId>org.apache.felix.karaf.gshell.console</artifactId>
         </dependency>
@@ -80,10 +92,6 @@
         </dependency>
         <dependency>
             <groupId>org.apache.felix.karaf.gshell</groupId>
-            <artifactId>org.apache.felix.karaf.gshell.features</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.felix.karaf.gshell</groupId>
             <artifactId>org.apache.felix.karaf.gshell.config</artifactId>
         </dependency>
         <dependency>
diff --git a/karaf/assembly/src/main/descriptors/unix-bin.xml b/karaf/assembly/src/main/descriptors/unix-bin.xml
index 2fffda8..e4093db 100644
--- a/karaf/assembly/src/main/descriptors/unix-bin.xml
+++ b/karaf/assembly/src/main/descriptors/unix-bin.xml
@@ -168,6 +168,17 @@
             <outputDirectory>/system</outputDirectory>
             <unpack>false</unpack>
             <useProjectArtifact>false</useProjectArtifact>
+            <outputFileNameMapping>org/apache/felix/karaf/features/${artifact.artifactId}/${artifact.baseVersion}/${artifact.artifactId}-${artifact.baseVersion}${dashClassifier?}.${artifact.extension}</outputFileNameMapping>
+            <includes>
+                <include>org.apache.felix.karaf.features:org.apache.felix.karaf.features.core</include>
+                <include>org.apache.felix.karaf.features:org.apache.felix.karaf.features.command</include>
+                <include>org.apache.felix.karaf.features:org.apache.felix.karaf.features.management</include>
+            </includes>
+        </dependencySet>
+        <dependencySet>
+            <outputDirectory>/system</outputDirectory>
+            <unpack>false</unpack>
+            <useProjectArtifact>false</useProjectArtifact>
             <outputFileNameMapping>org/apache/felix/karaf/deployer/${artifact.artifactId}/${artifact.baseVersion}/${artifact.artifactId}-${artifact.baseVersion}${dashClassifier?}.${artifact.extension}</outputFileNameMapping>
             <includes>
                 <include>org.apache.felix.karaf.deployer:org.apache.felix.karaf.deployer.filemonitor</include>
@@ -186,7 +197,6 @@
                 <include>org.apache.felix.karaf.gshell:org.apache.felix.karaf.gshell.admin</include>
                 <include>org.apache.felix.karaf.gshell:org.apache.felix.karaf.gshell.osgi</include>
                 <include>org.apache.felix.karaf.gshell:org.apache.felix.karaf.gshell.log</include>
-                <include>org.apache.felix.karaf.gshell:org.apache.felix.karaf.gshell.features</include>
                 <include>org.apache.felix.karaf.gshell:org.apache.felix.karaf.gshell.config</include>
                 <include>org.apache.felix.karaf.gshell:org.apache.felix.karaf.gshell.packages</include>
                 <include>org.apache.felix.karaf.gshell:org.apache.felix.karaf.gshell.ssh</include>
diff --git a/karaf/assembly/src/main/descriptors/windows-bin.xml b/karaf/assembly/src/main/descriptors/windows-bin.xml
index 1241f3f..8039fba 100644
--- a/karaf/assembly/src/main/descriptors/windows-bin.xml
+++ b/karaf/assembly/src/main/descriptors/windows-bin.xml
@@ -160,6 +160,17 @@
             <outputDirectory>/system</outputDirectory>
             <unpack>false</unpack>
             <useProjectArtifact>false</useProjectArtifact>
+            <outputFileNameMapping>org/apache/felix/karaf/features/${artifact.artifactId}/${artifact.baseVersion}/${artifact.artifactId}-${artifact.baseVersion}${dashClassifier?}.${artifact.extension}</outputFileNameMapping>
+            <includes>
+                <include>org.apache.felix.karaf.features:org.apache.felix.karaf.features.core</include>
+                <include>org.apache.felix.karaf.features:org.apache.felix.karaf.features.command</include>
+                <include>org.apache.felix.karaf.features:org.apache.felix.karaf.features.management</include>
+            </includes>
+        </dependencySet>
+        <dependencySet>
+            <outputDirectory>/system</outputDirectory>
+            <unpack>false</unpack>
+            <useProjectArtifact>false</useProjectArtifact>
             <outputFileNameMapping>org/apache/felix/karaf/deployer/${artifact.artifactId}/${artifact.baseVersion}/${artifact.artifactId}-${artifact.baseVersion}${dashClassifier?}.${artifact.extension}</outputFileNameMapping>
             <includes>
                 <include>org.apache.felix.karaf.deployer:org.apache.felix.karaf.deployer.filemonitor</include>
@@ -178,7 +189,6 @@
                 <include>org.apache.felix.karaf.gshell:org.apache.felix.karaf.gshell.admin</include>
                 <include>org.apache.felix.karaf.gshell:org.apache.felix.karaf.gshell.osgi</include>
                 <include>org.apache.felix.karaf.gshell:org.apache.felix.karaf.gshell.log</include>
-                <include>org.apache.felix.karaf.gshell:org.apache.felix.karaf.gshell.features</include>
                 <include>org.apache.felix.karaf.gshell:org.apache.felix.karaf.gshell.config</include>
                 <include>org.apache.felix.karaf.gshell:org.apache.felix.karaf.gshell.packages</include>
                 <include>org.apache.felix.karaf.gshell:org.apache.felix.karaf.gshell.ssh</include>
diff --git a/karaf/assembly/src/main/filtered-resources/etc/startup.properties b/karaf/assembly/src/main/filtered-resources/etc/startup.properties
index c7eb864..36f066b 100644
--- a/karaf/assembly/src/main/filtered-resources/etc/startup.properties
+++ b/karaf/assembly/src/main/filtered-resources/etc/startup.properties
@@ -43,7 +43,6 @@
 org/apache/felix/karaf/deployer/org.apache.felix.karaf.deployer.features/${pom.version}/org.apache.felix.karaf.deployer.features-${pom.version}.jar=30
 org/apache/felix/karaf/gshell/org.apache.felix.karaf.gshell.admin/${pom.version}/org.apache.felix.karaf.gshell.admin-${pom.version}.jar=30
 org/apache/felix/karaf/gshell/org.apache.felix.karaf.gshell.osgi/${pom.version}/org.apache.felix.karaf.gshell.osgi-${pom.version}.jar=30
-org/apache/felix/karaf/gshell/org.apache.felix.karaf.gshell.features/${pom.version}/org.apache.felix.karaf.gshell.features-${pom.version}.jar=30
 org/apache/felix/karaf/gshell/org.apache.felix.karaf.gshell.log/${pom.version}/org.apache.felix.karaf.gshell.log-${pom.version}.jar=30
 org/apache/felix/karaf/gshell/org.apache.felix.karaf.gshell.config/${pom.version}/org.apache.felix.karaf.gshell.config-${pom.version}.jar=30
 org/apache/felix/karaf/gshell/org.apache.felix.karaf.gshell.packages/${pom.version}/org.apache.felix.karaf.gshell.packages-${pom.version}.jar=30
@@ -51,6 +50,10 @@
 org/apache/felix/karaf/jaas/org.apache.felix.karaf.jaas.config/${pom.version}/org.apache.felix.karaf.jaas.config-${pom.version}.jar=30
 org/apache/felix/karaf/jaas/org.apache.felix.karaf.jaas.modules/${pom.version}/org.apache.felix.karaf.jaas.modules-${pom.version}.jar=30
 
+org/apache/felix/karaf/features/org.apache.felix.karaf.features.core/${pom.version}/org.apache.felix.karaf.features.core-${pom.version}.jar=30
+org/apache/felix/karaf/features/org.apache.felix.karaf.features.command/${pom.version}/org.apache.felix.karaf.features.command-${pom.version}.jar=30
+org/apache/felix/karaf/features/org.apache.felix.karaf.features.management/${pom.version}/org.apache.felix.karaf.features.management-${pom.version}.jar=30
+
 org/apache/felix/karaf/org.apache.felix.karaf.management/${pom.version}/org.apache.felix.karaf.management-${pom.version}.jar=30
 org/osgi/org.osgi.impl.bundle.jmx/${osgi.jmx.version}/org.osgi.impl.bundle.jmx-${osgi.jmx.version}.jar=30