You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ro...@apache.org on 2017/11/07 09:57:23 UTC

[sling-org-apache-sling-provisioning-model] 27/34: Remove artifact on merge regardless of the start level

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

rombert pushed a commit to annotated tag org.apache.sling.provisioning.model-1.0.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-provisioning-model.git

commit fb3de37111fdd0d253d12a6c26b95f3acf506d62
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Tue Oct 7 06:07:47 2014 +0000

    Remove artifact on merge regardless of the start level
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/tooling/support/provisioning-model@1629806 13f79535-47bb-0310-9956-ffa450edef68
---
 .../java/org/apache/sling/provisioning/model/ModelUtility.java    | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/main/java/org/apache/sling/provisioning/model/ModelUtility.java b/src/main/java/org/apache/sling/provisioning/model/ModelUtility.java
index b79b32b..d2536c5 100644
--- a/src/main/java/org/apache/sling/provisioning/model/ModelUtility.java
+++ b/src/main/java/org/apache/sling/provisioning/model/ModelUtility.java
@@ -56,9 +56,11 @@ public abstract class ModelUtility {
                     final ArtifactGroup baseGroup = baseRunMode.getOrCreateArtifactGroup(group.getStartLevel());
 
                     for(final Artifact artifact : group) {
-                        final Artifact found = baseGroup.search(artifact);
-                        if ( found != null ) {
-                            baseGroup.remove(found);
+                        for(final ArtifactGroup searchGroup : baseRunMode.getArtifactGroups()) {
+                            final Artifact found = baseGroup.search(artifact);
+                            if ( found != null ) {
+                                searchGroup.remove(found);
+                            }
                         }
                         baseGroup.add(artifact);
                     }

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.