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 10:02:49 UTC
[sling-org-apache-sling-feature-resolver] 05/20: [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-resolver.git
commit 0c36bd47798b1396af65005a64322e22adaf8b9a
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.
---
.../java/org/apache/sling/feature/resolver/FrameworkResolverTest.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/test/java/org/apache/sling/feature/resolver/FrameworkResolverTest.java b/src/test/java/org/apache/sling/feature/resolver/FrameworkResolverTest.java
index 290263e..4d3cb59 100644
--- a/src/test/java/org/apache/sling/feature/resolver/FrameworkResolverTest.java
+++ b/src/test/java/org/apache/sling/feature/resolver/FrameworkResolverTest.java
@@ -23,6 +23,7 @@ import org.apache.sling.feature.support.ArtifactHandler;
import org.apache.sling.feature.support.ArtifactManager;
import org.apache.sling.feature.support.ArtifactManagerConfig;
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;
@@ -140,7 +141,7 @@ public class FrameworkResolverTest {
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.