Search code examples
antfreemarkerfmpp

FMPP use old FTL syntax


It should be possible to configure freemarker to use the old #-less syntax.

However, to give users time to prepare for this change, in FreeMarker 2.1 and 2.2 the usage of # is optional, unless the programmer enables strict syntax mode in the FreeMarker configuration by calling setStrictSyntaxMode(true) on Configuration. In fact, we strongly recommend this to programmers. Starting from some later release this setting will be initially set to true. Also, you can specify if you want to use strict syntax or old syntax in the template files with the ftl directive.

How can I configure the fmpp preprocessor to use this old syntax with the Ant integration? Is there a setting or how can one call setStrictSyntaxMode(false)?

I am grateful for any assistance!


Solution

  • I was able to solve this by adding an "oldSyntax" Setting myself using the "setOldTemplateSyntax" method that is offered by the Engine.

    https://github.com/freemarker/fmpp/issues/20