Author: pauls
Date: Tue Sep 12 09:50:01 2017
New Revision: 1808095

URL: http://svn.apache.org/viewvc?rev=1808095&view=rev
Log:
Wrap featureprovider in a builder context where applicable.

Modified:
    
sling/whiteboard/cziegeler/osgifeature-maven-plugin/src/main/java/org/apache/sling/feature/maven/Preprocessor.java

Modified: 
sling/whiteboard/cziegeler/osgifeature-maven-plugin/src/main/java/org/apache/sling/feature/maven/Preprocessor.java
URL: 
http://svn.apache.org/viewvc/sling/whiteboard/cziegeler/osgifeature-maven-plugin/src/main/java/org/apache/sling/feature/maven/Preprocessor.java?rev=1808095&r1=1808094&r2=1808095&view=diff
==============================================================================
--- 
sling/whiteboard/cziegeler/osgifeature-maven-plugin/src/main/java/org/apache/sling/feature/maven/Preprocessor.java
 (original)
+++ 
sling/whiteboard/cziegeler/osgifeature-maven-plugin/src/main/java/org/apache/sling/feature/maven/Preprocessor.java
 Tue Sep 12 09:50:01 2017
@@ -23,6 +23,7 @@ import org.apache.sling.feature.Artifact
 import org.apache.sling.feature.Extension;
 import org.apache.sling.feature.ExtensionType;
 import org.apache.sling.feature.Feature;
+import org.apache.sling.feature.process.BuilderContext;
 import org.apache.sling.feature.process.FeatureBuilder;
 import org.apache.sling.feature.process.FeatureProvider;
 import org.apache.sling.feature.support.FeatureUtil;
@@ -119,12 +120,11 @@ public class Preprocessor {
             }
         }
 
-        final Feature assembledFeature = FeatureBuilder.assemble(feature, 
this.createFeatureProvider(env,
+        final Feature assembledFeature = FeatureBuilder.assemble(feature, new 
BuilderContext(this.createFeatureProvider(env,
                 info,
                 config.isTestConfig(),
                 config.isSkipAddDependencies(),
-                config.getScope(),
-                null));
+                config.getScope(), null)));
         if ( config.isTestConfig() ) {
             info.assembledTestFeature = assembledFeature;
         } else {
@@ -210,12 +210,12 @@ public class Preprocessor {
         }
         final List<Feature> assembledFeatureList = new ArrayList<>();
         for(final Feature feature : featureList) {
-            final Feature assembledFeature = FeatureBuilder.assemble(feature, 
this.createFeatureProvider(env,
+            final Feature assembledFeature = FeatureBuilder.assemble(feature, 
new BuilderContext(this.createFeatureProvider(env,
                     info,
                     config.isTestConfig(),
                     config.isSkipAddDependencies(),
                     config.getScope(),
-                    featureList));
+                    featureList)));
             assembledFeatureList.add(assembledFeature);
         }
         if ( config.isTestConfig() ) {
@@ -258,12 +258,12 @@ public class Preprocessor {
         }
         final List<Feature> assembledFeatureRefList = new ArrayList<>();
         for(final Feature feature : featureRefList) {
-            final Feature assembledFeature = FeatureBuilder.assemble(feature, 
this.createFeatureProvider(env,
+            final Feature assembledFeature = FeatureBuilder.assemble(feature, 
new BuilderContext(this.createFeatureProvider(env,
                     info,
                     config.isTestConfig(),
                     config.isSkipAddDependencies(),
                     config.getScope(),
-                    featureList));
+                    featureList)));
             assembledFeatureRefList.add(assembledFeature);
         }
         if ( config.isTestConfig() ) {
@@ -287,7 +287,7 @@ public class Preprocessor {
      * Add all dependencies from the feature
      * @param env The environment
      * @param info The project info
-     * @param assembleFeature The assembled feature for finding the artifacts.
+     * @param assembledFeature The assembled feature for finding the artifacts.
      * @param scope The scope which the new dependencies should have
      */
     private void addDependenciesFromFeature(


Reply via email to