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

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


The following commit(s) were added to refs/heads/master by this push:
     new 0443fd6  Remove bundle property from configuration
0443fd6 is described below

commit 0443fd6ab330a31531901426e0783948afe0b814
Author: Carsten Ziegeler <cziege...@apache.org>
AuthorDate: Fri Nov 16 15:01:45 2018 +0100

    Remove bundle property from configuration
---
 .../sling/feature/builder/FeatureBuilder.java      | 29 ++++++++++++++--------
 1 file changed, 18 insertions(+), 11 deletions(-)

diff --git a/src/main/java/org/apache/sling/feature/builder/FeatureBuilder.java 
b/src/main/java/org/apache/sling/feature/builder/FeatureBuilder.java
index 4668fa0..0c9bdf7 100644
--- a/src/main/java/org/apache/sling/feature/builder/FeatureBuilder.java
+++ b/src/main/java/org/apache/sling/feature/builder/FeatureBuilder.java
@@ -16,16 +16,6 @@
  */
 package org.apache.sling.feature.builder;
 
-import org.apache.sling.feature.Artifact;
-import org.apache.sling.feature.ArtifactId;
-import org.apache.sling.feature.Configuration;
-import org.apache.sling.feature.Extension;
-import org.apache.sling.feature.ExtensionType;
-import org.apache.sling.feature.Feature;
-import org.apache.sling.feature.FeatureConstants;
-import org.apache.sling.feature.Include;
-import org.osgi.framework.Version;
-
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.HashSet;
@@ -36,6 +26,16 @@ import java.util.Set;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
+import org.apache.sling.feature.Artifact;
+import org.apache.sling.feature.ArtifactId;
+import org.apache.sling.feature.Configuration;
+import org.apache.sling.feature.Extension;
+import org.apache.sling.feature.ExtensionType;
+import org.apache.sling.feature.Feature;
+import org.apache.sling.feature.FeatureConstants;
+import org.apache.sling.feature.Include;
+import org.osgi.framework.Version;
+
 public abstract class FeatureBuilder {
 
     /** Pattern for using variables. */
@@ -326,9 +326,16 @@ public abstract class FeatureBuilder {
 
             merge(result, feature, context, 
BuilderContext.ArtifactMergeAlgorithm.LATEST, false);
         }
-        processedFeatures.remove(feature.getId().toMvnId());
+
+        // remove bundle info from configuration
+        for (final Configuration cfg : result.getConfigurations()) {
+            cfg.getProperties().remove(Configuration.PROP_ARTIFACT_ID);
+        }
 
         result.setAssembled(true);
+
+        processedFeatures.remove(feature.getId().toMvnId());
+
         return result;
     }
 

Reply via email to