We're updating the issue view to help you get more done. 

Handelbars EnsurePropertiesHelper do not support global properties

Description

During refactoring I meet the following problem.

1 2 3 4 5 6 7 8 9 # dev evironment nodes: - node: aem-publish roles: - role: my-aem-cms config: dispatcher: cache: rootPath: /var/cache/publish1

This was the original configuration for aem dispatcher https://github.com/wcm-io-devops/conga-aem-definitions and it works.

since the variable dispatcher.cache.rootPath repeats in many environments, I moved it to the configuration of conga role my-aem-cms as default valee and remove the variable from environment :

1 2 3 4 5 # dev environment config: # dispatcher: # cache: # rootPath: /var/cache/publish1
1 2 3 4 5 # my-aem-cms role config: dispatcher: cache: rootPath: /var/cache/publish1

Now maven complains that it can't find the required variable:

1 2 3 [ERROR] Failed to execute goal io.wcm.devops.conga:conga-maven-plugin:1.11.2:generate (default-generate) on project vwg.bentley.wcm.configuration.environment: Execution default-generate of goal io.wcm.devops.conga:conga-maven-plugin:1.11.2:generate failed: Unable to generate file: /Users/gweng/workspace/bentley/by-configuration-management/configuration/by-aem/target/configuration/pvqa-by-dev/aem-publish/dispatcher.d/dispatcher_publish.any [ERROR] aem-dispatcher/publish/dispatcher_publish.any.hbs:1:2: java.io.IOException: Mandatory property not set: dispatcher.cache.rootPath [ERROR] aem-dispatcher/publish/dispatcher_publish.any.hbs:1:2

the error is raised by handelbar helper EnsurePropertiesHelper used in follow page:
https://github.com/wcm-io-devops/conga-aem-definitions/blob/develop/conga-aem-definitions/src/main/templates/aem-dispatcher/publish/dispatcher_publish.any.hbs

1 2 3 4 5 {{ensureProperties "dispatcher.renderInstance.host" "dispatcher.renderInstance.port" "dispatcher.cache.rootPath" ~}}

Environment

None

Status

Assignee

Unassigned

Reporter

Guiquan Weng

Labels

None

Components

Priority

Major