@page title="Version History" keywords="verions, version history">
<@sect title="0.9.16">
Date of release: 2018-09-03
Bug fixes: None
New features, improvements:
- Added new setting, <@s>recommendedDefaults@>, which when set to 0.9.16, will change some defaults of FMPP to better, more modern ones. Setting this to 0.9.16 is not backward compatible, so if you intend to do that in an older project, check what changes in the documentation of <@s>recommendedDefaults@>! (The Java API was extended accordingly; the <@c>fmpp.Engine@> now has <@a href="api/fmpp/Engine.html#constructor.summary">constructors@a> that get a <@c>Version recommendedDefaults@> parameter.)
- Added new settings, <@s>outputFormat@s>, and <@s>outputFormatsByPath@s> and <@s>mapCommonExtensionsToOutputFormats@>. "Output formats" is a <@fma href="dgui_misc_autoescaping.html">FreeMarker feature@> that (among others) allows better auto-escaping, deprecating <@c><#escape ...>...</#escape>@>. With these settings you can associate output format (and thus the desired kind of auto-escaping) to templates without adding anything inside the templates.
- Added new setting, <@s>interpolationSyntax@s>. This is especially handy if the <@c><#noparse>${#noparse>@> pattern clashes with the static parts that you need to generate (like when you generate JSP or Bash scripts), in which case you can set this setting to <@c>squareBracket@c> then write FreeMarker interpolations like <@c>[=<@r>expression@>]@>.
- Added new setting, <@s>removeFreemarkerExtensions@s>. When set to <@c>true@>, this removes the standard FreeMarker template file extensions (<@c>ftl@>, <@c>ftlh@>, <@c>ftlx@>) from the output file name. While you can achieve the same with the <@s>removeExtensions@> setting, it's cleaner this way, especially as with <@s>recommendedDefaults@> set to 0.9.16 it defaults to <@c>true@>.
- The list of file extensions that are treated as binary files is extended with lot of extensions frequent nowadays (or just were missed earlier); see them <@a href="settings.html#processingMode">in this section...@>
- When you have a JSON file that contains a JSON object (<@c>{ "key": value, ... }@>) on the top-level, and you load it with <@c>json(<@r>file@>)@>, now the resulting value can be used like a TDD hash. That is, you can use it directly as the value of the <@s>data@> setting, or you can add its entires (the key-value pairs) to another hash with <@a href="tdd.html#hashAddition">TDD hash addition@a>. (This is actually not specific to JSON. TDD now understands <@c>freemarker.template.TemplateHashModelEx@c>, and appropriate <@c>AdapterTemplateModel@c> objects, where a TDD hash is expected. So this works for any other custom data loaders that return such value as well.)
- Enabled using <@c>?api@> in FreeMarker templates (i.e., set the FreeMarker <@c>api_builtin_enabled@> configuration setting to <@c>true@>). (This doesn't decrease security in FMPP, as templates always could evaluate BeanShell scripts anyway.)
- Improved <@c>FMPP_HOME@c> auto-detection in the Bash start script (<@c>/bin/fmpp@>): If the directory that contains the start script has no <@c>lib/fmpp.jar@c> in it, then the <@c>FMPP_HOME@c> will be set to the first of the following directories that contains <@c>lib/fmpp.jar@c>: <@c>${'$'}{HOME}/opt/fmpp/@c>, <@c>/opt/fmpp/@c>, <@c>/usr/lib/fmpp/@c>
- Values loaded with the <@a href="dataloader.html#key_json">JSON data loader@a> now implement <@c>freemarker.template.AdapterTemplateModel@c> to allow more efficient conversion when passing them to Java methods from templates.
-
Updated dependencies:
- <@attc/> The minimum required Java version has been increased from 1.4 to 1.5.
- <@attc/> The minimum required FreeMarker version has been increased from 2.3.21 to 2.3.28.
- The distribution now contains Apache FreeMarker 2.3.28 (note that its owner has changed to the Apache Software Foundation)
- <@nbca/> In the unlikely case someone calls <@c>new Engine(null)@> (with literal <@c>null@>), that will now be a Java compilation error when the <@c>java@> file is recompiled, as now it's ambiguous,
and should be rewritten to <@c>new Engine((Version) null)@>. Binaries (<@c>class@> files) are not affected by this.
- Some minor API additions, code cleanups, and documentation cleanups.
- Updated example projects to use modern FreeMarker and FMPP features
@sect>
<@sect title="0.9.15">
Date of release: 2014-11-05
Bug fixes:
- Fixed an oversight where an <@c>Engine@c> static field was accidentally initialized in a non-static initializer, causing problems in multi-threaded environment.
- Removed version ranges from Maven dependencies, replacing them with concrete version numbers.
- Log files now don't contain the stack trace twice when the processing session is aborted by a file processing error.
- Setting values with integer type haven't understood <@c>+@c> prefix, like in <@c>+1@c>.
New features, improvements:
- Added <@a href="dataloader.html#key_json">JSON data loader@a>.
-
Exposed relevant FreeMarker settings added since 2.3.15:
- <@s>freemarkerIncompatibleImprovements@s> (also exposed to <@s>objectWrapper@s> scripts as a global variable with the same name)
- <@s>booleanFormat@s>
- <@s>sqlDateAndTimeTimeZone@s>
- The command line tool doesn't "snip" (<@c>--8<--@c>) error messages any more, instead, by default, it prints a cause message chain instead of a stack trace on error. This is especially useful as newer FreeMarker versions tend to give more detailed error messages that shouldn't be cut off. Stack traces can be asked with the new <@s>printStackTrace@s> setting. The <@s>snip@s> setting is now deprecated, and is only an inverted alias to <@s>printStackTrace@s>.
- Improved console error output quality in general.
- The command line tool now detects the actual number of console (terminal) columns and wraps lines accordingly. Earlier it has used 80 columns. This only works if you invoke FMPP with the provided shell script (<@c>bin/fmpp@c> or <@c>bin/fmpp.bat@c>). Also, it won't work if you have explicitly set the <@s>columns@s> setting (like in <@c>~/.fmpprc@c>) as then that will take precedence.
- Better <@c>java@c> location detection in the UN*X shell script (<@c>bin/fmpp@c>)
- FMPP license has been changed from BSD to Apache License 2.0. The copyright owner has been changed to be the same as the owners of FreeMarker. The two projects now share the same license and Contributor License Agreement.
-
The dependencies of FMPP has been updated/changed:
- <@attc/> The minimum required Java version has been increased from 1.2 to 1.4.
- <@attc/> The minimum required FreeMarker version has been increased from 2.3.15 to 2.3.21.
- Removed Oro dependency (<@c>lib/oro.jar@c>) as regular expression support is included in Java 1.4.
- Updated FreeMarker dependency from 2.3.15 to 2.3.21 (<@c>lib/freemarker.jar@c> and FreeMarker Manual).
- Updated <@c>ImageInfo@c> to version 1.9. It isn't included in <@c>fmpp.jar@c> any more, instead it's a regular dependency (<@c>lib/imageinfo.jar@c>).
- Updated <@c>xml-resolver.jar@c> dependency from 1.1 to version 1.2 (note that thus its license changes from Apache License 1.1 to Apache License 2.0)
- Added new constructor, <@c>Engine(BeansWrapper beansWrapper, Version fmIncompImprovements)@c>, deprecated the earlier <@c>Version@c>-less overload.
- Removed long deprecated method: <@c>Settings.execute(Engine eng)@c>.
- The project source code was moved from SourceForge.net to GitHub: <@url href="https://github.com/freemarker/fmpp" />.
- Overall source code structure and Ant build improvements.
- Updated Web site and documentation design, also cleaned up the content a bit.
@sect>
<@sect title="0.9.14">
Date of release: 2009-03-15
Bug fixes:
- Fixing bug that caused <@s>skipUnchanged@s> to skip a file when the destination was newer than the source. Now it only skips files when the modification date of the source and destination files are exactly the same.
- Fixing some TDD parser crashes occurring when parsing invalid TDD.
- Preventing obviously useless traversing inside SVN and CVS directories.
- Fixed some typos in the documentation.
New features, improvements:
- FMPP now can create empty directories using one of the two new features (reminder: FMPP creates output directories on-demand before an actual output file is created in them, hence usually it doesn't create empty directories):
- If a directory file contains a file named <@c>createdir.fmpp@c> then that will ensure that the containing directory will exist in the output as well. The <@c>createdir.fmpp@c> file itself will not appear in the output, it's only a marker.
- New setting, <@s>alwaysCreateDirectories@s>: If this is set to <@c>true@c>, all processed directories will produce a corresponding output directory, even when that directory will be empty.
- The <@a href="dataloader.html#key_xml">XML data loader@a> now supports XInclude-s by setting its <@c>xincludeAware@c> option to <@c>true@c>.
- To follow the Ant conventions, now <@s>sourceRoot@> can alternatively be specified with the <@c>srcdir@c> attribute, and <@s>outputRoot@s> with the <@c>destdir@c> attribute of the Ant task.
- API: New JavaBean propery in <@c>fmpp.Engine@c> and <@c>fmpp.setting.Settings@c>: <@c>dontTraverseDirectories@c>. It should be set to <@c>true@c> by front-ends that explicitly specify the list of all source files and source directories, rather than expecting the <@c>Engine@c> to discover them. Till now such front-ends only specified the list of files, so this property wasn't needed. However, to support the new <@c>alwaysCreateDirectories@c> setting, now the list of directories should be passed as well, and hence the need for this new property.
- Updated <@c>freemarker.jar@c> and the included FreeMarker Manual to 2.3.15.
@sect>
<@sect title="0.9.13">
Date of release: 2007-12-16
Bug fixes:
- The <@s>skipUnchanged@s> setting haven't had any effect since 0.9.10. Now it works again.
- When detecting the dimensions of certain image files, new lines were printed to the standard output (i.e., to the console).
- The <@c>slicedText@c> data loader has ignored the <@c>encoding@c> parameter.
- <@nbc/> The <@c>csv@c>, <@c>text@c> and <@c>slicedText@c> data loaders didn't skipped the BOM (byte order mark) character at the beginning of the file. This was a problem as the Windows Notepad inserts a BOM there when it saves with UTF-8 encoding. This fix is not 100% backward compatible, as someone may indeed wanted to have that BOM.
- API: The <@c>fmpp.dataloaders.AbstractTextDataLoader@c> ignored the encoding returned by the <@c>parseExtraArguments@c> method.
- API: The <@c>fmpp.dataloaders.AbstractTextDataLoader@c> didn't removed the BOM character from the beginning of files.
New features, improvements:
- The <@c>csv@c> data loader has a few new options: <@c>normalizeHeaders@c>, <@c>trimCells@c>, and <@c>emptyValue@c>. <@a href="dataloader.html#key_csv">More details...@a>
- <@nbc /> New setting: <@s>ignoreSvnFiles@s>. This will ignore directories with name <@c>.svn@c> inside the source root directory. This setting is by default on (<@c>true@c>), so it's theoretically not backward compatible.
- API: <@c>DataLoaderUtil.getStringArrayArgument@c> and <@c>getStringArrayOption@c> now have an overload with <@c>allowString@c> argument, so that a single item can be easily treated as an array of length 1.
- Updated <@c>freemarker.jar@c> and the included FreeMarker Manual to 2.3.11.
- The project has switched from CVS to SVN. The CVS repository is not used anymore.
@sect>
<@sect title="0.9.12">
Date of release: 2007-04-27
Bug fixes:
- <@nbc /> In TDD files value types were incorrectly forced to string if they were inside an explicitly defined hash (i.e. inside <@c>{@c> and <@c>}@c>). Like <@c>{x: 1, y: false}@> was interpreted as <@c>{x: "1", y: "false"}@c>, that is, both values were strings. From now it is interpreted correctly, so with the above example <@c>x@c> will be the number <@c>1@c> and <@c>y@c> will be the boolean <@c>false@c>.
New features, improvements:
- New data loader: <@c>tddSequence@c> for loading a TDD file as a TDD sequence (i.e. list) rather than as a TDD hash (i.e. map). <@a href="dataloader.html#key_tddSequence">More...@a>
- Updated <@c>freemarker.jar@c> to 2.3.10, and <@c>bhs.jar@c> (BeanShell) to 2.0b4 in the distribution pack.
@sect>
<@sect title="0.9.11">
Date of release: 2006-03-15
New features, improvements:
- New setting: <@s>tagSyntax@s>. This let you access this new setting of FreeMaker 2.3.5.
- For nightly FMPP builds the build date is now logged in additional to the version number.
- Updated <@c>freemarker.jar@c> to 2.3.6, and <@c>bhs.jar@c> (BeanShell) to 2.0b1.1 in the distribution pack.
Bug fixes:
- The Ant task have processed all files of the source root directory if the number of selected file was 0.
- <@nbc /> When <@s>sources@s> was set to any empty list in a configuration file, the whole source root directory was processed in certain cases. From now it will process no files in that case. If you want to process the whole source root directory, don't specify the <@s>sources@s> setting at all.
- <@nbca /> The <@c>Settings@c> class was badly assumed that the whole source root directory has to be processed if the <@s>sources@s> setting was an empty list. This was incorrect, as in that case simply 0 files should be processed, and processing the whole source directory should occur only if the <@s>sources@s> setting was not set at all (it's <@c>null@c> when you get it). So, if you want the whole source root directory to be processed, don't set the <@s>sources@s> setting at all. If it is already set, you can "unset" it with <@c>settings.remove(Settings.NAME_SOURCES)@c>.
- The Ant task didn't logged setting errors into the log file.
- The test suite now works with JDK 1.5, if you add <@c>xpathSupport.lib@c> to the <@c>build.properties@c>.
@sect>
<@sect title="0.9.10">
Date of release: 2005-10-23
New features, improvements:
- The <@a href="pphash.html#key_newWritableSequence"><@c>pp.newWritableSequence@c>@a> and <@a href="pphash.html#key_newWritableHash"><@c>pp.newWritableHash@c>@a> methods now have an optional parameter, which is the sequence or hash whose items are added to the new writable sequence or hash. This makes <@a href="pphash.html#key_newWritableHash"><@c>pp.copyWritable@c>@a> deprecated, which was not able to create writable sequences/hashes based on non-writable ones.
- New setting: <@s>objectWrapper@s>. This let FreeMarker "experts" to create and fully configure the <@c>freemarker.template.ObjectWrapper@c> object that FMPP will use.
- Java API: a new <@c>fmpp.Engine@c> constructor now let you specify the <@c>freemarker.template.ObjectWrapper@c> to use.
- FreeMarker 2.3.4 is included in the distribution. Note the new feature of FreeMarket that let you use <@c>[#<@r>...@r>]@c>, <@c>[@<@r>...@r>]@c>, etc instead of <@c><#<@r>...@r>>@c>, <@c><@<@r>...@r>>@c>, etc if you start the template with <@c>[#ftl]@c>.
- <@example 'multipage_list' /> was updated to use <@c><@r>sequence@r>?chunk(<@r>pageSize@r>)@c>, instead of complex BeanShell script that was needed before FreeMarker 2.3.3.
- Manual improvements.
Bug fixes:
- On Windows, <@c>fmpp.bat@c> has sometimes build the <@c>CLASSPATH@c> badly that ruined the command line call to java.exe and caused it to die with a strange <@c>ClassNotFoundError@c>.
- When a file is copied in "copy" processing mode, FMPP now sets the last modification time of the destination file to the last modification time of the source file.
- <@nbca/> The FMPP engine has used and modified the shared
<@c>freemarker.template.ObjectWrapper.BEANS_WRAPPER@c> object, which is dangerous. From now by default it uses its own <@c>ObjectWrapper@c> instance. If you have utilized that it uses the shared <@c>ObjectWrapper.BEANS_WRAPPER@c> object (not recommended!), then for 100% backward compatibility you have to use the <@s>objectWrapper@s> setting with this value:
<@c>"ow = ObjectWrapper.BEANS_WRAPPER; ow.setSimpleMapWrapper(true); return ow;"@c>
(or if you don't use FMPP settings, do this in Java where you create the engine object: <@c>ObjectWrapper ow = ObjectWrapper.BEANS_WRAPPER; ow.setSimpleMapWrapper(true); Engine eng = new Engine(ObjectWrapper.BEANS_WRAPPER);@c>)
@sect>
<@sect title="0.9.9">
Date of release: 2005-04-12
New features, improvements:
- The <@a href="dataloader.html#key_csv">csv data loader@a> was improved:
- With the new <@c>headers@c> option you can specify the header row for a CSV file that doesn't actually have a header row.
- With the new <@c>replaceHeaders@c> option you can override the header row of a CSV file.
- The values returned for the rows are now not only hashes but also the sequences of the cells.
- New data loader: <@c>slicedText@c> for loading a text file as a sequence of strings. <@a href="dataloader.html#key_slicedText">More...@a>
- Java API: New class: <@c>fmpp.dataloaders.AbstractTextDataLoader@c>, to ease the creation of custom text file data loaders for Java programmers.
- Java API: New <@c>StringUtil@c> methods: <@c>normalizeNewliens@c>, <@c>split@c> with trimming.
- <@nbc/>The <@c>+@c> operator in TDD files and configuration files is not allowed anymore. This operator was used for adding hashes prior 0.9.0. Since 0.9.0 the preferred (and now required) way of adding hashes is different. For example, assuming that your configuration file is in <@a href="properties.html">"properties"@a> format (that is, the extension of the FMPP configuration file is <@c>cfg@c> or <@c>properties@c>), instead of this:
<@c>data={a:1, b:2} + properties(data/style.properties) + birds:csv(data/birds.csv)@c>
your should write this:
<@c>data=a:1, b:2, tdd(data/style.tdd), birds:csv(data/birds.csv)@c>
<@a href="tdd.html#hashAddition">More information on hash addition...@a>
Bug fixes:
- The <@c>csv@c> data loader has incorrectly interpreted <@c>"\n\r"@c> as a single line-break.
- Fixed some mistakes in the Manual and in the JavaDocs.
@sect>
<@sect title="0.9.8">
Date of release: 2005-01-28
New features, improvements:
- FreeMarker 2.3.2mod (a stable nightly build after 2.3.2) is included.
- FMPP was updated to enable the new output encoding and URL escaping related features of FreeMarker 2.3.1. (The usage of 2.3.2mod is recommended because of a bug fix.)
- New setting: <@s>urlEscapingCharset@s>
- Java API: added static final fields to <@c>Engine@c> for reserved engine parameter (setting) value strings: <@c>PARAMETER_VALUE_SOURCE@c>, <@c>PARAMETER_VALUE_HOST@c>, <@c>PARAMETER_VALUE_OUTPUT@c>. Also added the similar missing static fields to the <@c>Settings@c> class.
Bug fixes:
- The reserved <@c>"host"@c> output encoding value was not resolved in some rare cases.
- The the <@c>pp.urlEnc@c>/<@c>pp.urlPathEnc@c> functions and the <@c>fmpp.util.StringUtil.urlEnc(...)@c>/<@c>urlPathEnc(...)@c> methods were malfunctioned with a few charsets, for example with UTF-16, UTF-7, and EBCDIC based charsets.
- <@nbca/>The documentation of <@c>fmpp.ProgressListener.notifyProgressEvent(<@r>...@r>)@c> forgot to mention regarding the <@c>event@c> parameter that: "As new event types can be introduced with new FMPP versions (even if it happens very seldom), a progress listener implementation should survive events that it does not understand. That is, it must not stop with an error, but it should silently ignore the event." Note that there is no new event type in this version.
- Many fixes in the Manual and in the the API JavaDocs.
- <@nbca/>The <@c>fmpp.util.NullWriter@c> and <@c>fmpp.util.NullOutputStream@c> classes has no public constructor anymore. Use their static <@c>INSTANCE@> field to get the singleton.
- Fixed test-suite bugs: Windows vs UN*X vs Mac line-breaks, class-path problem in the <@c>build.xml@c>.
@sect>
<@sect title="0.9.7">
Date of release: 2004-03-01
New features, improvements:
- New setting: <@s>freemarkerLinks@s>. This is a dirty hack to satisfy a frequent demand: <@c><#include <@r>...@r>>@c>/<@c><#import <@r>...@r>>@c> files that are outside the source root directory (as FTL macro libraries used by more projects).
- Later nightly FreeMarker 2.3 build is included.
Bug fixes:
- <@nbc/>From now, native separators (as backslash under Windows) are not tolerated in the paths used in <@c><#import <@r>...@r>>@c> and <@c><#include <@r>...@r>>@c> directives. You must use <@c>/@c> there.
- Fixes in the Manual and in the the API JavaDocs.
@sect>
<@sect title="0.9.6">
Date of release: 2004-01-20
New features, improvements:
- New processing mode: <@c>renderXml@c>. When a source file is processed in this mode, it's parsed as XML, and then the parsed XML document is rendered to output file(s) by a FreeMarker template, which is chosen based on the path or the document element of the XML document.
- New setting: <@s>xmlRenderings@s>. <@a href="settings.html#xmlRendering">More info...@a>
- New <@c>pp@c> variable: <@c>pp.doc@c>. <@a href="pphash.html#key_doc">More info...@a>
- Java API: New class: <@c>fmpp.XmlRenderingConfiguration@c>. New <@c>fmpp.Engine.PMODE_<@r>...@r>@c> constant: <@c>PMODE_RENDER_XML@c>. New <@c>Engine@c> methods to add/clean XML rendering configurations.
- When template execution dies with error, and it didn't generated any output yet, nor it flushed the output explicitly or by changing output file, then no 0 length output file will be generated.
- New target in the <@c>build.xml@c>, <@c>qinstall@c>. It's the same as <@c>install@c>, but assumes <@c>y@c> for all questions.
- Added figures to the <@a href="qtour.html">Quick Tour@a> chapter.
- Java API: Added a new utility method to <@c>Engine@c>: <@c>static String getProgressListenerEventName(int event)@c>
@sect>
<@sect title="0.9.5">
Date of release: 2004-01-14
New features, improvements:
- Java API: Improvements to the <@c>Settings@c> class:
- The API of this class is now as stable as other FMPP API-s, so it is not marked as experimental anymore.
- The <@c>execute(Engine)@c> method is now deprecated, and will be soon removed. Use <@c>execute()@c> instead. If you use <@c>Settings@c>, then don't create <@c>Engine@c> objects manually anymore, just use the <@c>Settings@c> object alone. See an example <@a href="writefrontend.html">here...@a>
- Methods have been added to deal with progress listeners and engine attributes.
- Java API: some convenience methods has been added: <@c>Settings.set(String, boolean)@c>, <@c>Settings.set(String, int)@c>, <@c>Settings.setDefault(String, boolean)@c>, <@c>Settings.setDefault(String, int)@c>, <@c>Engine.isXmlSupportAvailable()@c>, <@c>TddHashLocalDataLoader(String)@c>
- More API documentation.
- More reliable and helpful <@c>install@c> Ant target.
- Terminology change: To prevent confusion, the settings of the <@c>fmpp.Engine@c> object (known be people who use FMPP at Java API level) are now called "engine parameters", as the "settings" term is already used since version 0.9.0 for the high level settings seen by usual front-end users.
- Many grammatical mistakes have been fixed in the documentation. Other minor improvements in the Manual.
Bug fixes:
- A later nightly FreeMarker 2.3 build is included, that fixes various bugs with XML related keys <@c>@@markup@c>, <@c>@@nested_markup@c>, <@c>@@start_tag@c>, and <@c>@@attributes_markup@c>. This is mostly important for people who uses data of XHTML format for generating (X)HTML pages.
@sect>
<@sect title="0.9.4">
Date of release: 2004-01-03
New features, improvements:
- New setting: <@s>localData@s>
- Till now, all source files (all templates) have started with the same data model, the one you have specified with the <@s>data@s> setting. With the new <@s>localData@s> setting you can add variables to, and override the variables of the common data model, for groups of source files selected by path patterns.
- This feature also let you attach a BeanShell script to a template, that can done some complex calculations before template execution, and put the results into the data model for the individual template.
- The <@s>templateData@s> setting is now deprecated.
- Java API changes: New interface <@c>fmpp.LocalDataBuilder@c>, deprecates <@c>fmpp.TemplateDataModelBuilder@c>.
- The <@s>borders@s> setting supports multiple layers. That is, multiple borders can be used at once for the same file.
- In <@c><@pp.renameOutputFile <@r>...@r> />@c> you can use the <@c>extension@c> parameter instead of <@c>name@c>, to change only the extension of the output file.
- Java API: <@c>TemplateEnvironment@c> has new methods, most importantly <@c>static TemplateEnvironment getCurrentInstance()@c> for accessing the current template environment in FreeMarker transforms/methods.
- Java API: New methods to <@c>Engine@c>: <@c>Object getData(name)@c> (returns unwrapped original values), <@c>Object removeData(name)@c>, <@c>cleatData()@c> (deprecates misnamed <@c>clearSharedVariables()@c>).
- Java API: Engine attribute that implements <@c>ProgressListener@c> get notifications about engine events.
- Java API: <@c>fmpp.tdd.FunctionCall@c> has public constructor now.
- <@nbca /><@c>Engine.getData(<@r>...@r>)@c> doesn't throw <@c>TemplateModelException@c> anymore, because data wrapping is now deferred until the session execution.
- <@nbca />Synchronization was removed from <@c>Engine@c>. It did the same as if you synchronize on the <@c>Engine@c> instance and call the methods anyway...
- <@nbca /><@c>ProgressListener.notifyProgressEvent(<@r>...@r>)@c> is now allowed to throw <@c>Exception@c>.
- More API documentation.
Bug fixes:
- <@c><@pp.renameOutputFile <@r>...@r> />@c> has malfunctioned when the buffer was already flushed.
- Minor documentation fixes.
- 3rd party libraries BeanShell and ORO were upgraded. The upgrades fix a few bugs.
- <@nbca />Package <@c>fmpp.listeners@c> were renamed to <@c>fmpp.progresslisteners@c>.
- <@nbca /><@c>Engine.removeAttribue@c> was renamed to <@c>Engine.removeAttribute@c>.
@sect>
<@sect title="0.9.3">
Date of release: 2003-12-22
New features, improvements:
- In FreeMarker 2.3: The quotations in FreeMarker error messages are now terser and thus easier to read.
- Various really missing XML related features added (<@a href="settings.html#xml">Detailed information...@a>):
- New settings: <@s>xmlCatalogFiles@s>, <@s>xmlCatalogPrefer@s>. With these settings you can setup the OASIS catalogs that will be used for resolving entities in XML files. (See <@example 'xml_validating' />)
- New option to the xml data loader: <@c>validate@c>. This specifies if the XML file will be checked for validity.
- New setting: <@s>validateXml@s>. This specifies if by default XML files will be checked for validity.
- New setting: <@s>xpathEngine@s>. With this setting you can set if you want to use Jaxen or Xalan for XPath-s.
Bug fixes:
- In FreeMarker 2.3: A bug that caused template processing to fail with <@c>NullPointerException@c> on low memory conditions is now fixed. A bug in Jaxen XPath support that caused <@c>NullPointerException@c>-s has been fixed. Etc.
- <@nbca/><@c>Engine.process@c> doesn't throw sly unchecked <@c>fmpp.IllegalConfigurationException@c>-s anymore. Also, <@c>fmpp.IllegalConfigurationException@c> is not public from now; it wasn't mentioned in other public API-s anyway.
- FMPP has died with internal error if somebody tried to use XML related features, and XML support was not available.
- Minor documentation fixes.
@sect>
<@sect title="0.9.2">
Date of release: 2003-11-12
Bug fixes:
- <@nbc/> Only Windows users (and the users of other operation systems where paths use something else instead of slash) are affected by this fix. Relative paths in <@c><#include <@r>...@r>>@c> and <@c><#import <@r>...@r>>@c> were badly interpreted relatively to the <@s>sourceRoot@s>. Now they are correctly interpreted relatively to the directory of the template file. This bug fix is not backward compatible, if you have accidentally utilized the bad behavior. For example, you have included <@c><@r><sourceRoot>@r>/includes/foo.ftl@c> in a template file which is in not directly in the <@s>sourceRoot@s> like this: <@c><#include "includes/foo.ftl">@c>. Now you should replace it with: <@c><#include "/includes/foo.ftl">@c>.
- Minor documentation fixes.
@sect>
<@sect title="0.9.1">
Date of release: 2003-11-09
New features, improvements:
- <@nbc/>Data loader <@c>antProperty@c> and <@c>antProperties@c> now can convert the property values to numerical, boolean, or data/time/date-time variables. For example, to expose property <@c>x@c> as numerical variable, use <@c>antProperty(x?n)@c> instead of <@c>antProperty(x)@c>. This causes backward compatibility problem only if you have Ant property names that ends with one of these: <@c>?n@c>, <@c>?b@c>, <@c>?d@c>, <@c>?t@c>, <@c>?dt@c>, <@c>?s@c>, and you have specified their name as parameter to these data loaders. In this case, append <@c>?s@c> at the end of the parameters. <@a href="dataloader.html#key_antProperty">More info...@a>
- Data loader <@c>csv@c> now supports columns of type date, time, and date-time. <@a href="dataloader.html#key_csv">More info...@a>
- Later nightly build of FreeMarker 2.3 is included, that introduces new built-ins: <@c>j_string@c>, <@c>js_string@c>. These can be used to escape text with Java language or JavaScript string literal escaping rules. Also it contains some minor bug fixes.
- The text hard-wrapper (used by the command-line tool) has some fixes and improvements.
- Added a chapter about writing new front-ends. <@a href="writefrontend.html">Here...@a>
- A few minor fixes in the documentation and in the examples.
Bug fixes:
- The <@s>expert@s> setting worked inverted with the Ant task when it decided if you are allowed to use the project base directory as <@s>outputRoot@s>.
- The <@c>install@c> target of <@c>build.xml@c> didn't stopped nicely if the <@c>ANT_HOME@c> was not set.
@sect>
<@sect title="0.9.0">
Date of release: 2003-10-30
New features, improvements:
- <@nbc/>The default configuration file format is TDD from now, instead of "Java properties" (to decrease the number of syntaxes user has to use). Files with extension <@c>cfg@c> or <@c>properties@c> are automatically interpreted as "Java properties" file, so the old <@c>fmpp.cfg@c>-s will still work. But if your old configuration file doesn't use extension <@c>cfg@c> or <@c>properties@c>, then you have to rename it now. Also, note that the default file name for the new (TDD) configuration files is <@c>config.fmpp@c>, which has priority over <@c>fmpp.cfg@c> when both present in the same directory. <@a href="configfile.html">More info...@a>
- TDD was substantially revisited.
- The TDD syntax has several improvements and also conceptual changes. The revisited TDD is backward compatible with the old. However, I will remove hash unions later, so <@c>+@c> will be available for other purposes. To prepare for this future change, just replace <@c>+@c> characters with comma (<@c>,@c>) in your hash unions. <@a href="tdd.html">See the chapter about the new TDD...@a>
- All FTL string literal features are supported. Escapes, raw strings...
- With a new escape sequence, strings can be broken into multiple lines visually, without affecting their value.
- Much more character is allowed in unquoted strings.
- FTL comments and single line <@c>#@c> comments are supported.
- TDD files can specify their own encoding (charset) with a special comment in their first line.
- Line-break can be used instead of comma to separate items in listings.
- The hash union concept was gone. Instead, you can put hashes directly into the enclosing hash.
- In hashes the value can be omitted from the key:value pair, in which case it defaults to <@c>true@c>.
- TDD error messages show the error location (line, column, file) and quote the problematic line.
- TDD now uses term "TDD function" instead of "TDD directive".
- <@nbca/><@c>fmpp.tdd.TddParser@c> was gone, and <@c>fmpp.tdd.Interpreter@c> was introduced instead, which has different API.
- The FMPP Ant task now can load the settings from configuration files, with the new attribute <@c>configuration@c>. Thus, now you can store the settings in a single place if you use FMPP both as command-line tool and Ant task. Look at <@example "build.xml"/> and <@example "ant3"/> to see applications.
- New setting: <@c>inheritConfiguration@c>. It is used for "customizing" an existing configuration by overriding some settings in it. See <@example "inherit_cfg" />. <@a href="configfile.html#inheritance">More info...@a>
- <@nbc/>Setting <@c>sources@c> now uses TDD sequence syntax. Thus, you can't separate the files with <@c>:@c> or <@c>;@c> anymore, but with comma (<@c>,@c>). According to TDD syntax, quote file names that contain problematic characters, e.g.:
<@c>no/problem/with.it, "but quote this.txt",
C:\windows\path, r"C:\quote this win\path"@c>
- Error message creation mechanism was changed. The messages are now more "stupid mechanical", but there is far less chance that some helpful detail is accidentally left out.
- The default values of a few settings of the command-line tool can be customized with <@c>.fmpprc@c> file placed into the user home directory or into the FMPP home directory. <@a href="commandline.html#fmpprc">More info...@a>
- The <@c>get@c> data loader function returns the values of other variables in the data model. This can be used to pass previously loaded data to other data loaders as parameters, for example:
<@c>data: {doc:xml(data/foo.xml), index:com.example.IndexBuilderDataLoader(get(doc))}@c>. <@a href="dataloader.html#key_get">More information...@a>
- Data loader <@c>eval@c> has an optional 2nd parameter, the hash of variables that will be available when the BeansScript is evaluated. For example:
<@c>data: eval('<@r>...@r>', {foo:properties(foo.properties), items:get(items)})@c>
<@a href="dataloader.html#key_eval">More info...@a>.
- With the new <@s>appendLogFile@s> setting you can specify that the log file is continued, rather than restarted for each processing session.
- <@nbc/>The <@c>fmpp@c> file extension is now reserved for the purposes of FMPP. Files with this extension are never processed (they are ignored). If you had to process files of this extension, protect them using double extension as <@c>test.fmpp.keepme@c>, and then add the extra extension (<@c>keepme@c> in this case) to the <@s>removeExtensions@s> setting.
- The <@s>quiet@s> setting now accepts values <@c>true@c>, <@c>false@c>, and <@c>reallyQuiet@c>. Integer values are supported for backward compatibility only.
- These settings were renamed: <@s false>removePostfix@s> to <@s>removePostfixes@s>, <@s false>removeExtension@s> to <@s>removeExtensions@s>, <@s false>replaceExtension@s> to <@s>replaceExtensions@s>. This change is backward compatible, because the old names are internally translated.
- New FMPP Ant task attribute: <@c>antTaskFailOnError@c>. This tells if the FMPP Ant task should abort the Ant project with error if there were errors during the FMPP processing session.
- <@c>Engine.process(File src, File out)@c> now modifies <@c>null@c> <@s>sourceRoot@s> and/or <@s>outputRoot@s> settings for the time of the method call to the parent directories of the source and output files respectively.
- FMPP build information (build date) can be queried with the new method, <@c>Engine.getBuildInfo@c>. Also now the command-line tool prints it with <@c>--version@c>.
- Improvements to the command-line help, such as new command-line option <@c>--long-help@c>.
- <@nbca/><@c>Engine.process@c> doesn't throw <@c>IOException@c> anymore, only <@c>ProcessingException@c>.
- <@nbca/>The built-in <@c>DataLoader@c> implementations were moved into new package <@c>tdd.dataloaders@c>.
- <@nbca/><@c>tdd.util.StringUtil.excToStr(Throwable)@c> was removed.
- Revisited documentation and site generator.
- Now mode x is set for <@c>bin/*@c> in the tar file.
- Added test suite. (But more test cases should be added...)
Bug fixes:
- <@c>fmpp.bat@c> was stopped with error if it didn't find Ant! AAARGH!
- A later nightly build of the uncompleted FreeMarker 2.3 is included. This fixes a FreeMarker bug that has caused the first empty line of the template files ignored, when the template has started with empty line.
- <@nbc/>The FMPP Ant task didn't aborted the Ant project when <@c>stopOnError="false"@c>, and the were skipped failed processing. Now it does. Note that the old behavior can be emulated using <@c>antTaskFailOnError="false"@c>.
- <@c>pp.locale@c> didn't followed the locale changes made at template execution time with <@c><#setting locale=<@r>...@r>>@c>.
- Various other little fixes here and there... But don't be sad. Many exciting new bugs has been added during the refactorings... ;)
@sect>
<@sect title="0.8.12">
Date of release: 2003-09-30
New features, improvements:
- <@nbc/>A later nightly build of the uncompleted FreeMarker 2.3 is included. Unfortunately it contains some incompatible changes (Sorry... :( I will not risk nightly FreeMarker builds anymore after 2.3 is out...):
- White-space stripping is now more aggressive as before: it always removes leading and trailing white-space if the line only contains FTL tags. (Earlier the white-space was not removed if the tag was <@c><#include ...>@c> or user-defined directive tag with empty directive syntax as <@c><@myMacro/>@c> (or its equivalents: <@c><@myMacro></@myMacro>@c> and <@c><@myMacro></@>@c>). Now white-space is removed in these cases as well.) Also, top-level white-space that separates macro definitions and/or assignments is now ignored. <@fma href="dgui_misc_whitespace.html#dgui_misc_whitespace_stripping">More information...@fma>
- The return value of <@c>freemarker.template.TemplateMethodModel.exec(...)@c> is <@c>Object@c>, not <@c>TemplateModel@c>.
- New <@c>pp@c> variable: <@c>freemarkerVersion@c>. Also, new <@c>fmpp.Engine@c> method: <@c>fmpp.Engine.getFreeMarkerVersionNumber()@c>. Also, FreeMarker version number is printed together with FMPP version number everywhere.
- <@nbca/>API change: <@c>fmpp.Engine.getVersionNumber()@c> does not throw checked exceptions anymore.
- New <@c>pp@c> directive: <@c>pp.restartOutputFile@c>. This directive empties the output file, but does not delete the file or discards the further output as <@c>pp.dropOutputFile@c> does.
- <@nbc/>New setting: "ignore temporary files". This filters out certain typical temporary/backup files (that is, it chooses ignore processing mode for them), unless you explicitly set this setting to false. The old <@c>.bak@c> and <@c>~*@c> filter mechanism was removed. Note that this all does not affect the FMPP Ant task. <@a href="settings.html#processingMode">More information...@a>
Bug fixes:
- With setting "borders", using headers with a template that contains <@c><#ftl <@r>...@r>>@c> resulted on illegal FreeMarker template, as nothing can precede the <@c>ftl@c> directive. Now the header is intelligently moved after the <@c>ftl@c> directive.
- The documentation of <@c>pp.set@c> and <@c>pp.add@c> was totally confused.
- The engine was unable to return the FMPP version number sometimes due class loader issues.
- <@nbc/>Setting "ignore CVS files" had lower priority than the processing mode chooser list. Now it has higher priority.
- <@nbc/>Setting "ignore CVS files" didn't ignored <@c>.#?*@c> files. Now it does.
@sect>
<@sect title="0.8.11">
Date of release: 2003-08-11
New features, improvements:
- <@nbc/>A later nighly build of the uncompleted FreeMarker 2.3 is included. Most importantly, its XML handling is now much better, but unfortunately has incompatible changes:
- Attribute queries such as <@c>foo.@bar@c> now return sequences (similarly to child element queries and XPath queries), not single nodes. Because of the rule with node sequences of size 1, it is still good to write <@c><#noparse>${foo.@bar}#noparse>@c>, but built-ins such as <@c>?exists@c>, <@c>?if_exists@c> or <@c>?default@c> don't work as before. For example, instead of <@c>foo.@bar?default('black')@c>, you now have to write <@c>foo.@bar[0]?default('black')@c>. So if you have used existence built-ins with attributes, you have to find those occurrences in the templates and add that <@c>[0]@c>.
- XML name-space handling has been totally reworked and is absolutely incompatible with the old stuff. Don't worry about this if none of your XML input documents use <@c>xmlns@c>.
- Special-keys <@c>@@@c> and <@c>@*@c> now return a sequence of attribute nodes instead of the hash of them.
- The <@c>xml@c> data loader has a new boolean option: <@c>namespaceAware@c>. If this is set to <@c>false@c>, you can load XML files with the logic as XML has worked before the introduction of name-spaces.
- Minor fixes/improvements in the manual.
Bug fixes:
- The FMPP Ant task stopped with error if you have used nested elements and you have executed multiple "top-level" tasks with the same ant invocation.
- The snip function of the command-line tool has snipped the text-flood too late sometimes.
@sect>
<@sect title="0.8.10">
Date of release: 2003-07-03
New features, improvements:
- <@nbc/>This release uses a nightly build of the uncompleted FreeMarker 2.3. FreeMarker 2.3 adds several important new features to 2.2.x, but it is not fully backward compatible. Do not forget to read the <@fma href="versions_2_3.html">list of uncompatible changes in the FreeMarker Manual@fma>!
- <@c>antProperties@c> improved: You can give the names of Ant properties you want to expose, as parameters. So if you want to expose only properties <@c>foo@c> and <@c>bar@c>, then just write <@c>antProperties(foo, bar)@c>. <@a href="dataloader.html#key_antProperites">More info...@a>
- New data loader <@c>antProperty@c>, to expose the value of a single Ant property. <@a href="dataloader.html#key_antProperty">More info...@a>
- New data loader <@c>xml@c>, which uses the new XML wrapper of FreeMarker. It replaces the old <@c>xmlInfoset@c> data loader, which is kept only for backward compatibility. <@a href="dataloader.html#key_xml">More info...@a>
- Some code clean-up (as removing a few unused variables).
- From now, <@c>freemarker.jar@c> will be checked in to the CVS repository.
Bug fixes:
- <@nbca/> In <@c>fmpp.util.FreemarkerUtil@c>, <@c>FtlVarToCoreJavaObject@c> is now renamed to <@c>ftlVarToCoreJavaObject@c>
@sect>
<@sect title="0.8.9">
Date of release: 2003-05-02
New features, improvements:
- Better error messages: FMPP tools now tend to show the whole cause chain, rather than just the top-level exception.
- New data loader: <@c>text@c>. This loads a plain text file into a string variable.
- New pp variable to retrieve the FMPP Engine version number: <@c>pp.version@c>
- Easier to build:
- Task for getting the latest nightly FMPP.
- Fixed the class loading issues of the "docs" task, so the default target is now "build".
- The distribution now works with JDK 1.2.2
- Minor additions to the Manual.
Bug fixes:
- The Ant build was not working without <@c>build.properties@c>.
- The localized lookup feature of FreeMarker was not disabled, and it could cause confusing effects.
- The log file didn't stored the source file path for errors that was logged before the "END OF PROCESSING SESSION" message.
@sect>
<@sect title="0.8.8">
Date of release: 2003-04-29
New features, improvements:
- Rewritten <@c>fmpp.bat@c>; it is now more flexible.
- More documentation. No more "Under Construction" logo.
- New <@c>pp@c> hash methods: <@c>outputFileLastModified@c>, <@c>sourceFileLastModified@c>, <@c>realFileLastModified@c>
Bug fixes:
- Predefined data loader <@c>now@c> didn't used the "time zone" FMPP engine setting.
- The "turns" setting was missing from the Manual.
- Fixing some typos in the error messages and in the documentation.
@sect>
<@sect title="0.8.7">
Date of release: 2003-04-12
New features, improvements:
- New date/time related settings of FreeMarker 2.2.1 are exposed now: date format, time format, datetime format, time zone
- Date/time related <@c>pp@c> variables: <@c>now@c>, <@c>sessionStart@c>.
- Final version of FreeMarker 2.2.1 is included.
Bug fixes:
- The classpath in <@c>fmpp.jar@c> didn't included <@c>bsh.jar@c>.
@sect>
<@sect title="0.8.6">
Date of release: 2003-04-06
New features, improvements:
- New pp method: <@c>pp.loadData(<@r>dataLoaderName@r>, <@r>args...@r>)@c>. This can be used to load data into a variable in templates, with the same data loaders as with the "data" setting. <@a href="pphash.html#loadData">More information...@a>
- New <@c>Engine@c> method: <@c>TemplateModel wrap(Object obj)@c>
- Newer nightly build of FreeMarker is included (2.2.1).
Bug fixes:
- <@nbca/><@c>DataLoader.load(engine, args)@c> now uses <@c>List@c> instead of <@c>ArrayList@c> for the <@c>args@c>.
- The <@c>install@c> target of <@c>build.xml@c> forgot to copy <@c>bsh.jar@c>.
- Minor fixes in the documentation.
@sect>
<@sect title="0.8.5">
Date of release: 2003-03-23
New features, improvements:
- New built-in data loader directive: <@c>eval(<@r>JavaExpression@r>)@c>
Bug fixes:
- Fixes in the documentation.
@sect>
<@sect title="0.8.4">
Date of release: 2003-03-21
New features, improvements:
- More documentation. Especially in the <@a href="commandline.html">documentation of the command-line tool.@a>
- New setting: replace extension
- <@nbc/>If the option <@c>remove-extension@c> or <@c>remove-postfix@c> is specified both in the configuration file and in the command-line, then the two option parameter values will be merged.
- Newer nightly build of FreeMarker 2.2 is included.
Bug fixes:
- The output file name deduction was applied twice in certain situations.
@sect>
<@sect title="0.8.3">
Date of release: 2003-03-16
New features, improvements:
- <@c>bin/fmpp@c> and <@c>bin\fmpp.bat@c> now can load the FMPP realted jars from the <@c>ANT_HOME@c>.
- Added <@c>install@c> target to <@c>build.xml@c> that copies the jars to the <@c>ANT_HOME@c>.
- More detailed installing instructions.
Bug fixes:
- <@c>fmpp.FileUtil.compressPath@c> has died with <@c>IndexOutOfBounds@c> in rare cases.
- <@c>rar@c> was missing from the list of static file extensions.
@sect>
<@sect title="0.8.2">
Date of release: 2003-03-13
New features, improvements:
- Block assignments instead of <@c>@capture@c>. For example, instead of <@c><@capture local="foo"><@r>...@r></@capture>@c> you can write <@c><#local foo><@r>...@r></#local>@c>.
- New pp methods to calculate relative paths: <@c><@a href="pphash.html#key_pathTo">pathTo@a>@c> and <@c><@a href="pphash.html#key_sourcePathTo">sourcePathTo@a>@c>.
- <@c>fmpp.FileUtil.getRelativePath@c> does no require anymore that the starting point is an ascendent directory of the destination.
- Newer nightly build of FreeMarker 2.2 is included (supports block assignments + bug fixes).
Bug fixes:
- <@c>fmpp.FileUtil.getRelativePath@c> has returned bad results in some rare situations.
@sect>
<@sect title="0.8.1">
Date of release: 2003-03-10
New features, improvements:
- Added "ignore CVS files" setting.
- Added <@c>xml_infoset@c> example.
- Simplified build process.
- Some minor fixes in the html-s and txt-s.
- Newer nightly build of FreeMarker 2.2 is included.
- <@nbc/><@c>?chop@c> was renamed to <@c>?chop_linebreak@c> (due the changes in the FreeMarker 2.2 CVS head)
- <@nbc/>CVS files (<@c>**/.cvsignore@c> and <@c>**/CVS/@c>) in the source directory will be ignored by default.
Bug fixes:
- The <@c>Manifest.mf@c> in <@c>fmpp.jar@c> was empty.
- Last-generated date was incorrect on the HTML pages.
@sect>
<@sect title="0.8.0">
Date of release: 2003-03-05
The initial Sourceforge release.
@sect>
@page>