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

olli pushed a commit to branch master
in repository 
https://gitbox.apache.org/repos/asf/sling-org-apache-sling-testing-paxexam.git

commit ab63ee4d09d0932c2e0a7edd3092fa88e4524ef1
Author: Oliver Lietz <[email protected]>
AuthorDate: Thu Jan 11 19:59:25 2018 +0100

    SLING-7373 Use Handlebars for templating
---
 .../templates/{SlingOptions.txt => SlingOptions.hbs} | 20 ++++++++++----------
 ...gVersionResolver.txt => SlingVersionResolver.hbs} |  6 +++---
 2 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/src/main/resources/templates/SlingOptions.txt 
b/src/main/resources/templates/SlingOptions.hbs
similarity index 87%
rename from src/main/resources/templates/SlingOptions.txt
rename to src/main/resources/templates/SlingOptions.hbs
index e4e1154..1188e64 100644
--- a/src/main/resources/templates/SlingOptions.txt
+++ b/src/main/resources/templates/SlingOptions.hbs
@@ -124,18 +124,18 @@ public class SlingOptions {
             config()
         );
     }
-[# th:each="feature : ${features}"]
-    public static Option [(${feature.javaName})]() {
-        return composite([# th:each="fc,fcsStatus : ${feature.getFeatures()}"]
-            [(${fc})]()[# th:unless="${fcsStatus.last}"],[/][/][# th:if="${not 
#lists.isEmpty(feature.getFeatures())}"][# th:if="${not 
#lists.isEmpty(feature.getBundles())}"],[/][/][# th:each="bundle,bundlesStatus 
: ${feature.getBundles()}"]
-            
mavenBundle().groupId("[(${bundle.groupId})]").artifactId("[(${bundle.artifactId})]").version(versionResolver)[#
 th:unless="${bundlesStatus.last}"],[/][/][# th:if="${not 
#lists.isEmpty(feature.getConfigurations())}"],[/][# 
th:each="configuration,configurationsStatus : ${feature.getConfigurations()}"]
-            [# th:if="${configuration.isFactory()}"]factoryConfiguration[/][# 
th:unless="${configuration.isFactory()}"]newConfiguration[/]("[(${configuration.pid})]")
    [# th:each="entry,entriesStatus : ${configuration.getEntries()}"]
-                .put("[(${entry.key})]", [(${entry.value})])[/]
-                .asOption()[# th:unless="${configurationsStatus.last}"],[/][/]
+{{#each features}}
+    public static Option {{javaName}}() {
+        return composite({{#each features}}
+            {{this}}(){{#unless @last}},{{/unless}}{{/each}}{{#if 
features}}{{#if bundles}},{{/if}}{{/if}}{{#each bundles}}
+            
mavenBundle().groupId("{{groupId}}").artifactId("{{artifactId}}").version(versionResolver){{#unless
 @last}},{{/unless}}{{/each}}{{#if configurations}},{{/if}}{{#each 
configurations}}
+            {{#if 
factory}}factoryConfiguration{{else}}newConfiguration{{/if}}("{{pid}}"){{#each 
entries}}
+                .put("{{@key}}", {{{this}}}){{/each}}
+                .asOption(){{#unless @last}},{{/unless}}{{/each}}
         );
     }
-
-[/]    public static Option slingQuickstartOakTar(final String 
workingDirectory, final int httpPort) {
+{{/each}}
+    public static Option slingQuickstartOakTar(final String workingDirectory, 
final int httpPort) {
         final String slingHome = String.format("%s/sling", workingDirectory);
         final String repositoryHome = String.format("%s/repository", 
slingHome);
         final String localIndexDir = String.format("%s/index", repositoryHome);
diff --git a/src/main/resources/templates/SlingVersionResolver.txt 
b/src/main/resources/templates/SlingVersionResolver.hbs
similarity index 96%
rename from src/main/resources/templates/SlingVersionResolver.txt
rename to src/main/resources/templates/SlingVersionResolver.hbs
index df9cb0c..99db376 100644
--- a/src/main/resources/templates/SlingVersionResolver.txt
+++ b/src/main/resources/templates/SlingVersionResolver.hbs
@@ -60,9 +60,9 @@ public class SlingVersionResolver implements VersionResolver {
         versions.put("org.slf4j:jcl-over-slf4j", "1.7.25");
         versions.put("ch.qos.logback:logback-core", "1.2.3");
         versions.put("ch.qos.logback:logback-classic", "1.2.3");
-        versions.put("biz.aQute.bnd:biz.aQute.bndlib", "3.5.0");[# 
th:each="bundle : ${bundles}"]
-        versions.put("[(${bundle.groupId})]:[(${bundle.artifactId})]", 
"[(${bundle.version})]");
-[/]    }
+        versions.put("biz.aQute.bnd:biz.aQute.bndlib", "3.5.0");{{#each 
bundles}}
+        versions.put("{{groupId}}:{{artifactId}}", "{{version}}");{{/each}}
+    }
 
     private String key(final String groupId, final String artifactId) {
         return String.format("%s:%s", groupId, artifactId);

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

Reply via email to