karaf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cschnei...@apache.org
Subject svn commit: r1521048 - /karaf/trunk/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/features/FeatureMetaDataExporter.java
Date Mon, 09 Sep 2013 11:20:00 GMT
Author: cschneider
Date: Mon Sep  9 11:19:59 2013
New Revision: 1521048

URL: http://svn.apache.org/r1521048
Log:
KARAF-2460 write feature dependencies

Modified:
    karaf/trunk/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/features/FeatureMetaDataExporter.java

Modified: karaf/trunk/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/features/FeatureMetaDataExporter.java
URL: http://svn.apache.org/viewvc/karaf/trunk/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/features/FeatureMetaDataExporter.java?rev=1521048&r1=1521047&r2=1521048&view=diff
==============================================================================
--- karaf/trunk/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/features/FeatureMetaDataExporter.java
(original)
+++ karaf/trunk/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/features/FeatureMetaDataExporter.java
Mon Sep  9 11:19:59 2013
@@ -48,12 +48,12 @@ public class FeatureMetaDataExporter {
     }
 
     public void writeFeature(Feature feature) throws XMLStreamException {
-        writer.add(factory.createStartElement("", "", "feature"));
-        writer.add(factory.createAttribute("name", feature.getName()));
-        if (feature.getVersion() != null) {
-            writer.add(factory.createAttribute("version", feature.getVersion()));
+        writeFeatureTag(feature);
+        for (String featureDep : feature.getDependencies()) {
+            writer.add(factory.createStartElement("", "", "feature"));
+            writer.add(factory.createCharacters(featureDep));
+            endElement("feature");
         }
-        newLine();
         for (BundleRef bundle : feature.getBundles()) {
             writer.add(factory.createStartElement("", "", "bundle"));
             if (bundle.getStartLevel() != null) {
@@ -70,6 +70,15 @@ public class FeatureMetaDataExporter {
         endElement("feature");
     }
 
+    private void writeFeatureTag(Feature feature) throws XMLStreamException {
+        writer.add(factory.createStartElement("", "", "feature"));
+        writer.add(factory.createAttribute("name", feature.getName()));
+        if (feature.getVersion() != null) {
+            writer.add(factory.createAttribute("version", feature.getVersion()));
+        }
+        newLine();
+    }
+
     public void close() throws XMLStreamException {
         endElement("bundles");
         writer.add(factory.createEndDocument());



Mime
View raw message