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

rombert pushed a commit to annotated tag slingstart-maven-plugin-1.7.6
in repository 
https://gitbox.apache.org/repos/asf/sling-slingstart-maven-plugin.git

commit 2a3f62db10c6e6e1b539e12270bbd1a6ceff5d46
Author: Carsten Ziegeler <[email protected]>
AuthorDate: Tue May 2 13:55:44 2017 +0000

    SLING-6819 : Includes are removed from attached model
    
    git-svn-id: 
https://svn.apache.org/repos/asf/sling/trunk/tooling/maven/slingstart-maven-plugin@1793494
 13f79535-47bb-0310-9956-ffa450edef68
---
 .../org/apache/sling/maven/slingstart/ModelPreprocessor.java     | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git 
a/src/main/java/org/apache/sling/maven/slingstart/ModelPreprocessor.java 
b/src/main/java/org/apache/sling/maven/slingstart/ModelPreprocessor.java
index 73770de..5a81cab 100644
--- a/src/main/java/org/apache/sling/maven/slingstart/ModelPreprocessor.java
+++ b/src/main/java/org/apache/sling/maven/slingstart/ModelPreprocessor.java
@@ -159,15 +159,18 @@ public class ModelPreprocessor {
                     nodeBooleanValue(info.plugin, 
"allowUnresolvedPomDependencies", false)));
         }
 
+        final Model copyModel = new Model();
+        this.mergeModels(copyModel, info.localModel);
+
         // we have to create an effective model to add the dependencies
-        final Model effectiveModel = 
ModelUtility.getEffectiveModel(info.localModel, resolverOptions);
+        final Model effectiveModel = ModelUtility.getEffectiveModel(copyModel, 
resolverOptions);
 
-        final List<Model> dependencies = searchSlingstartDependencies(env, 
info, info.localModel, effectiveModel);
+        final List<Model> dependencies = searchSlingstartDependencies(env, 
info, copyModel, effectiveModel);
         info.model = new Model();
         for(final Model d : dependencies) {
             this.mergeModels(info.model, d);
         }
-        this.mergeModels(info.model, info.localModel);
+        this.mergeModels(info.model, copyModel);
         info.model = ModelUtility.getEffectiveModel(info.model, 
resolverOptions);
 
         final Map<Traceable, String> errors = 
ModelUtility.validate(info.model);

-- 
To stop receiving notification emails like this one, please contact
"[email protected]" <[email protected]>.

Reply via email to