You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by pa...@apache.org on 2018/04/26 10:09:21 UTC

[sling-whiteboard] branch master updated: User felix util manifest Parser instead of sling commons.osgi one.

This is an automated email from the ASF dual-hosted git repository.

pauls pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-whiteboard.git


The following commit(s) were added to refs/heads/master by this push:
     new 3a6f787  User felix util manifest Parser instead of sling commons.osgi one.
3a6f787 is described below

commit 3a6f7871f09db45fcb0488c1535edc4d6869243a
Author: Karl Pauls <kp...@adobe.com>
AuthorDate: Thu Apr 26 12:09:11 2018 +0200

    User felix util manifest Parser instead of sling commons.osgi one.
---
 featuremodel/feature-analyser/pom.xml                         |  8 +-------
 .../analyser/task/impl/CheckBundlesForInitialContent.java     |  9 +++++----
 .../feature/analyser/task/impl/CheckBundlesForResources.java  | 11 ++++++-----
 featuremodel/feature-applicationbuilder/pom.xml               |  6 ------
 featuremodel/feature-resolver/pom.xml                         |  6 ------
 5 files changed, 12 insertions(+), 28 deletions(-)

diff --git a/featuremodel/feature-analyser/pom.xml b/featuremodel/feature-analyser/pom.xml
index 0241695..add7b59 100644
--- a/featuremodel/feature-analyser/pom.xml
+++ b/featuremodel/feature-analyser/pom.xml
@@ -56,7 +56,7 @@
                         <outputDirectory>${project.build.directory}/classes</outputDirectory>
                         <overWriteReleases>false</overWriteReleases>
                         <overWriteSnapshots>true</overWriteSnapshots>
-                        <includeArtifactIds>org.apache.felix.converter,org.apache.sling.feature,org.apache.sling.commons.johnzon,org.apache.sling.commons.osgi,osgi.core,slf4j-api,slf4j-simple</includeArtifactIds>
+                        <includeArtifactIds>org.apache.felix.converter,org.apache.sling.feature,org.apache.sling.commons.johnzon,osgi.core,slf4j-api,slf4j-simple</includeArtifactIds>
                     </configuration>
                 </execution>
             </executions>
@@ -126,12 +126,6 @@
         </dependency>
         <dependency>
             <groupId>org.apache.sling</groupId>
-            <artifactId>org.apache.sling.commons.osgi</artifactId>
-            <version>2.4.0</version>
-            <scope>provided</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.sling</groupId>
             <artifactId>org.apache.sling.commons.johnzon</artifactId>
             <version>1.0.0</version>
             <scope>provided</scope>
diff --git a/featuremodel/feature-analyser/src/main/java/org/apache/sling/feature/analyser/task/impl/CheckBundlesForInitialContent.java b/featuremodel/feature-analyser/src/main/java/org/apache/sling/feature/analyser/task/impl/CheckBundlesForInitialContent.java
index c45c2d7..d5e2360 100644
--- a/featuremodel/feature-analyser/src/main/java/org/apache/sling/feature/analyser/task/impl/CheckBundlesForInitialContent.java
+++ b/featuremodel/feature-analyser/src/main/java/org/apache/sling/feature/analyser/task/impl/CheckBundlesForInitialContent.java
@@ -18,7 +18,8 @@
  */
 package org.apache.sling.feature.analyser.task.impl;
 
-import org.apache.sling.commons.osgi.ManifestHeader;
+import org.apache.felix.utils.manifest.Clause;
+import org.apache.felix.utils.manifest.Parser;
 import org.apache.sling.feature.analyser.task.AnalyserTask;
 import org.apache.sling.feature.analyser.task.AnalyserTaskContext;
 import org.apache.sling.feature.scanner.BundleDescriptor;
@@ -65,10 +66,10 @@ public class CheckBundlesForInitialContent implements AnalyserTask {
         if ( m != null ) {
             final String root =  m.getMainAttributes().getValue(CONTENT_HEADER);
             if (root != null) {
-                final ManifestHeader header = ManifestHeader.parse(root);
-                for (final ManifestHeader.Entry entry : header.getEntries()) {
+                Clause[] clauses = Parser.parseHeader(root);
+                for (final Clause entry :clauses) {
 
-                    String path = entry.getDirectiveValue(PATH_DIRECTIVE);
+                    String path = entry.getDirective(PATH_DIRECTIVE);
                     if (path == null) {
                         path = "/";
                     } else if (!path.startsWith("/")) {
diff --git a/featuremodel/feature-analyser/src/main/java/org/apache/sling/feature/analyser/task/impl/CheckBundlesForResources.java b/featuremodel/feature-analyser/src/main/java/org/apache/sling/feature/analyser/task/impl/CheckBundlesForResources.java
index 92fe8db..545244e 100644
--- a/featuremodel/feature-analyser/src/main/java/org/apache/sling/feature/analyser/task/impl/CheckBundlesForResources.java
+++ b/featuremodel/feature-analyser/src/main/java/org/apache/sling/feature/analyser/task/impl/CheckBundlesForResources.java
@@ -18,7 +18,8 @@
  */
 package org.apache.sling.feature.analyser.task.impl;
 
-import org.apache.sling.commons.osgi.ManifestHeader;
+import org.apache.felix.utils.manifest.Clause;
+import org.apache.felix.utils.manifest.Parser;
 import org.apache.sling.feature.analyser.task.AnalyserTask;
 import org.apache.sling.feature.analyser.task.AnalyserTaskContext;
 import org.apache.sling.feature.scanner.BundleDescriptor;
@@ -64,10 +65,10 @@ public class CheckBundlesForResources implements AnalyserTask {
         if ( m != null ) {
             final String root =  m.getMainAttributes().getValue(BUNDLE_RESOURCE_ROOTS);
             if (root != null) {
-                final ManifestHeader header = ManifestHeader.parse(root);
-                for (final ManifestHeader.Entry entry : header.getEntries()) {
-                    final String resourceRoot = entry.getValue();
-                    final String pathDirective = entry.getDirectiveValue(PATH_DIRECTIVE);
+                Clause[] clauses = Parser.parseHeader(root);
+                for (final Clause entry : clauses) {
+                    final String resourceRoot = entry.getName();
+                    final String pathDirective = entry.getDirective(PATH_DIRECTIVE);
                     if (pathDirective != null) {
                         bundleResources.add(resourceRoot + "!" + pathDirective);
                     } else {
diff --git a/featuremodel/feature-applicationbuilder/pom.xml b/featuremodel/feature-applicationbuilder/pom.xml
index cc16c11..fed4c08 100644
--- a/featuremodel/feature-applicationbuilder/pom.xml
+++ b/featuremodel/feature-applicationbuilder/pom.xml
@@ -151,12 +151,6 @@
             <scope>provided</scope>
         </dependency>
         <dependency>
-            <groupId>org.apache.sling</groupId>
-            <artifactId>org.apache.sling.commons.osgi</artifactId>
-            <version>2.4.0</version>
-            <scope>provided</scope>
-        </dependency>
-        <dependency>
             <groupId>org.osgi</groupId>
             <artifactId>org.osgi.service.resolver</artifactId>
             <version>1.0.1</version>
diff --git a/featuremodel/feature-resolver/pom.xml b/featuremodel/feature-resolver/pom.xml
index d320ce2..3df68ea 100644
--- a/featuremodel/feature-resolver/pom.xml
+++ b/featuremodel/feature-resolver/pom.xml
@@ -79,12 +79,6 @@
             <scope>provided</scope>
         </dependency>
         <dependency>
-            <groupId>org.apache.sling</groupId>
-            <artifactId>org.apache.sling.commons.osgi</artifactId>
-            <version>2.4.0</version>
-            <scope>provided</scope>
-        </dependency>
-        <dependency>
             <groupId>org.osgi</groupId>
             <artifactId>org.osgi.service.resolver</artifactId>
             <version>1.0.1</version>

-- 
To stop receiving notification emails like this one, please contact
pauls@apache.org.