[ 
https://issues.apache.org/jira/browse/KARAF-1432?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13267315#comment-13267315
 ] 

Tuomas Kiviaho edited comment on KARAF-1432 at 5/3/12 9:02 AM:
---------------------------------------------------------------

{code}

#P karaf-maven-plugin
Index: 
src/main/java/org/apache/karaf/tooling/features/ValidateDescriptorMojo.java
===================================================================
--- src/main/java/org/apache/karaf/tooling/features/ValidateDescriptorMojo.java 
(revision 1300512)
+++ src/main/java/org/apache/karaf/tooling/features/ValidateDescriptorMojo.java 
(working copy)
@@ -54,14 +66,12 @@
 import org.apache.maven.shared.dependency.tree.DependencyTreeBuilder;
 import org.apache.maven.shared.dependency.tree.traversal.DependencyNodeVisitor;
+import aQute.libg.header.OSGiHeader;
 
 /**
  * Validates a features XML file
  * 
- * @version $Revision:$
+ * @version $Revision$
  * @goal features-validate-descriptor
  * @execute phase="process-resources"
  * @requiresDependencyResolution runtime
@@ -343,12 +353,7 @@
         }
 
         String packages = (String) properties.get(jreVersion);
-        for (String pkg : packages.split(";")) {
-            systemExports .add(pkg.trim());
-        }
-        for (String pkg : packages.split(",")) {
-            systemExports .add(pkg.trim());
-        }
+        systemExports.addAll(OSGiHeader.parseHeader(packages).keySet());
     }
{code}
                
      was (Author: tuomas_kiviaho):
    


#P karaf-maven-plugin
Index: 
src/main/java/org/apache/karaf/tooling/features/ValidateDescriptorMojo.java
===================================================================
--- src/main/java/org/apache/karaf/tooling/features/ValidateDescriptorMojo.java 
(revision 1300512)
+++ src/main/java/org/apache/karaf/tooling/features/ValidateDescriptorMojo.java 
(working copy)
@@ -54,14 +66,12 @@
 import org.apache.maven.shared.dependency.tree.DependencyTreeBuilder;
 import org.apache.maven.shared.dependency.tree.traversal.DependencyNodeVisitor;
+import aQute.libg.header.OSGiHeader;
 
 /**
  * Validates a features XML file
  * 
- * @version $Revision:$
+ * @version $Revision$
  * @goal features-validate-descriptor
  * @execute phase="process-resources"
  * @requiresDependencyResolution runtime
@@ -343,12 +353,7 @@
         }
 
         String packages = (String) properties.get(jreVersion);
-        for (String pkg : packages.split(";")) {
-            systemExports .add(pkg.trim());
-        }
-        for (String pkg : packages.split(",")) {
-            systemExports .add(pkg.trim());
-        }
+        systemExports.addAll(OSGiHeader.parseHeader(packages).keySet());
     }
                  
> karaf:features-validate-descriptor parses system packages incorrectly
> ---------------------------------------------------------------------
>
>                 Key: KARAF-1432
>                 URL: https://issues.apache.org/jira/browse/KARAF-1432
>             Project: Karaf
>          Issue Type: Bug
>          Components: karaf-tooling
>    Affects Versions: 3.0.0
>            Reporter: Tuomas Kiviaho
>
> Config.properties containing jre system packages is parsed without taking 
> care of osgi header syntax. javax.transaction is not parsed correctly for jre 
> 1.6 and neither are entries that are defived from felix (I guess that the 
> syntax should be still the same).
> By using BND's OSGiHeader.parseHeader this can be easily fixed.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to