-
Type: Improvement
-
Status: Resolved
-
Priority: Minor
-
Resolution: Fixed
-
Affects Version/s: 5.6-SNAPSHOT
-
Component/s: Configuration
-
Tags:
-
Backlog priority:400
-
Impact type:Configuration format change
-
Upgrade notes:
To be able to add some logic to the templates and factorize some of them, we need a richer templating language than just "replace keys with values".
Freemarker seems to fit the bill and is used in other parts of Nuxeo so people are familiar with it -> integrate it.
There is a constraint of the Freemarker data model that makes it impossible to have a key name that starts with another existing key name (ie "nuxeo.foo" and "nuxeo.foo.bar").
-> migrate the few keys that are blocking for this, use a map in ConfigurationGenerator or TextTemplate to convert the old ones in memory.
We don't want to parse everything as Freemarker: use a specific extension to mark the files we want to process. We shouldn't use the default '.ftl' in case we want to include .ftl files to be deployed by a template.
-> use '.nxftl' and remove the extension on copy (ie 'server.xml.nxftl' will be processed in Freemarker and the resulting file will be name 'server.xml').
Due to the expected factorization of some templates (possibly the database ones and certainly the https one), we need to be able to tell people to not use a specific template anymore.
-> add a key for deprecation (<templatename>.deprecated=true),
-> add an optional message in case of deprecation (<templatename>.deprecation=message).