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

[sling-org-apache-sling-feature-applicationbuilder] 08/21: [Feature Model] Support separate phases for reading variables

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

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

commit a0f92b4a9712cecdbc4ccdf39d49a1bb695caeba
Author: David Bosschaert <da...@gmail.com>
AuthorDate: Fri Mar 16 12:01:14 2018 +0000

    [Feature Model] Support separate phases for reading variables
    
    Variables in the feature model must be substituted at different points in
    time, depending on where they reside. Variables in the includes, bundle,
    requirements and capabilities section must be substituted before the
    resolver runs, as they influence the resolver result. They should not be
    substituted at launch time. Other variables, such as configuration and
    framework properties variables must be substituted at launch time.
---
 .../sling/feature/applicationbuilder/impl/ApplicationBuilderTest.java  | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/test/java/org/apache/sling/feature/applicationbuilder/impl/ApplicationBuilderTest.java b/src/test/java/org/apache/sling/feature/applicationbuilder/impl/ApplicationBuilderTest.java
index 0c88957..9d84329 100644
--- a/src/test/java/org/apache/sling/feature/applicationbuilder/impl/ApplicationBuilderTest.java
+++ b/src/test/java/org/apache/sling/feature/applicationbuilder/impl/ApplicationBuilderTest.java
@@ -29,6 +29,7 @@ import org.apache.sling.feature.support.ArtifactManager;
 import org.apache.sling.feature.support.ArtifactManagerConfig;
 import org.apache.sling.feature.support.json.ApplicationJSONWriter;
 import org.apache.sling.feature.support.json.FeatureJSONReader;
+import org.apache.sling.feature.support.json.FeatureJSONReader.Phase;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
@@ -155,7 +156,7 @@ public class ApplicationBuilderTest {
         final ArtifactHandler featureArtifact = artifactManager.getArtifactHandler(file);
 
         try (final FileReader r = new FileReader(featureArtifact.getFile())) {
-            final Feature f = FeatureJSONReader.read(r, featureArtifact.getUrl());
+            final Feature f = FeatureJSONReader.read(r, featureArtifact.getUrl(), Phase.RESOLVE);
             return f;
         }
     }

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