0.9.16
Date of release: 2018-09-03
Bug fixes: None
New features, improvements:
- Added new setting,
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 ofrecommendedDefaults
! (The Java API was extended accordingly; thefmpp.Engine
now has constructors that get aVersion recommendedDefaults
parameter.) - Added new settings,
outputFormat
, andoutputFormatsByPath
andmapCommonExtensionsToOutputFormats
. "Output formats" is a FreeMarker feature that (among others) allows better auto-escaping, deprecating<#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,
interpolationSyntax
. This is especially handy if the${
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 tosquareBracket
then write FreeMarker interpolations like[=expression]
. - Added new setting,
removeFreemarkerExtensions
. When set totrue
, this removes the standard FreeMarker template file extensions (ftl
,ftlh
,ftlx
) from the output file name. While you can achieve the same with theremoveExtensions
setting, it's cleaner this way, especially as withrecommendedDefaults
set to 0.9.16 it defaults totrue
. - 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 in this section...
- When you have a JSON file that contains a JSON object (
{ "key": value, ... }
) on the top-level, and you load it withjson(file)
, now the resulting value can be used like a TDD hash. That is, you can use it directly as the value of thedata
setting, or you can add its entires (the key-value pairs) to another hash with TDD hash addition. (This is actually not specific to JSON. TDD now understandsfreemarker.template.TemplateHashModelEx
, and appropriateAdapterTemplateModel
objects, where a TDD hash is expected. So this works for any other custom data loaders that return such value as well.) - Enabled using
?api
in FreeMarker templates (i.e., set the FreeMarkerapi_builtin_enabled
configuration setting totrue
). (This doesn't decrease security in FMPP, as templates always could evaluate BeanShell scripts anyway.) - Improved
FMPP_HOME
auto-detection in the Bash start script (/bin/fmpp
): If the directory that contains the start script has nolib/fmpp.jar
in it, then theFMPP_HOME
will be set to the first of the following directories that containslib/fmpp.jar
:${HOME}/opt/fmpp/
,/opt/fmpp/
,/usr/lib/fmpp/
- Values loaded with the JSON data loader now implement
freemarker.template.AdapterTemplateModel
to allow more efficient conversion when passing them to Java methods from templates. -
Updated dependencies:
- Attention! The minimum required Java version has been increased from 1.4 to 1.5.
- Attention! 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)
- Warning! Incompatible Java API change! In the unlikely case someone calls
new Engine(null)
(with literalnull
), that will now be a Java compilation error when thejava
file is recompiled, as now it's ambiguous, and should be rewritten tonew Engine((Version) null)
. Binaries (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
0.9.15
Date of release: 2014-11-05
Bug fixes:
- Fixed an oversight where an
Engine
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
+
prefix, like in+1
.
New features, improvements:
- Added JSON data loader.
-
Exposed relevant FreeMarker settings added since 2.3.15:
freemarkerIncompatibleImprovements
(also exposed toobjectWrapper
scripts as a global variable with the same name)booleanFormat
sqlDateAndTimeTimeZone
- The command line tool doesn't "snip" (
--8<--
) 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 newprintStackTrace
setting. Thesnip
setting is now deprecated, and is only an inverted alias toprintStackTrace
. - 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 (
bin/fmpp
orbin/fmpp.bat
). Also, it won't work if you have explicitly set thecolumns
setting (like in~/.fmpprc
) as then that will take precedence. - Better
java
location detection in the UN*X shell script (bin/fmpp
) - 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:
- Attention! The minimum required Java version has been increased from 1.2 to 1.4.
- Attention! The minimum required FreeMarker version has been increased from 2.3.15 to 2.3.21.
- Removed Oro dependency (
lib/oro.jar
) as regular expression support is included in Java 1.4. - Updated FreeMarker dependency from 2.3.15 to 2.3.21 (
lib/freemarker.jar
and FreeMarker Manual). - Updated
ImageInfo
to version 1.9. It isn't included infmpp.jar
any more, instead it's a regular dependency (lib/imageinfo.jar
). - Updated
xml-resolver.jar
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,
Engine(BeansWrapper beansWrapper, Version fmIncompImprovements)
, deprecated the earlierVersion
-less overload. - Removed long deprecated method:
Settings.execute(Engine eng)
. - The project source code was moved from SourceForge.net to GitHub: 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.
0.9.14
Date of release: 2009-03-15
Bug fixes:
- Fixing bug that caused
skipUnchanged
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
createdir.fmpp
then that will ensure that the containing directory will exist in the output as well. Thecreatedir.fmpp
file itself will not appear in the output, it's only a marker. - New setting,
alwaysCreateDirectories
: If this is set totrue
, all processed directories will produce a corresponding output directory, even when that directory will be empty.
- If a directory file contains a file named
- The XML data loader now supports XInclude-s by setting its
xincludeAware
option totrue
. - To follow the Ant conventions, now
sourceRoot
can alternatively be specified with thesrcdir
attribute, andoutputRoot
with thedestdir
attribute of the Ant task. - API: New JavaBean propery in
fmpp.Engine
andfmpp.setting.Settings
:dontTraverseDirectories
. It should be set totrue
by front-ends that explicitly specify the list of all source files and source directories, rather than expecting theEngine
to discover them. Till now such front-ends only specified the list of files, so this property wasn't needed. However, to support the newalwaysCreateDirectories
setting, now the list of directories should be passed as well, and hence the need for this new property. - Updated
freemarker.jar
and the included FreeMarker Manual to 2.3.15.
0.9.13
Date of release: 2007-12-16
Bug fixes:
- The
skipUnchanged
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
slicedText
data loader has ignored theencoding
parameter. - Warning! Incompatible change! The
csv
,text
andslicedText
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
fmpp.dataloaders.AbstractTextDataLoader
ignored the encoding returned by theparseExtraArguments
method. - API: The
fmpp.dataloaders.AbstractTextDataLoader
didn't removed the BOM character from the beginning of files.
New features, improvements:
- The
csv
data loader has a few new options:normalizeHeaders
,trimCells
, andemptyValue
. More details... - Warning! Incompatible change! New setting:
ignoreSvnFiles
. This will ignore directories with name.svn
inside the source root directory. This setting is by default on (true
), so it's theoretically not backward compatible. - API:
DataLoaderUtil.getStringArrayArgument
andgetStringArrayOption
now have an overload withallowString
argument, so that a single item can be easily treated as an array of length 1. - Updated
freemarker.jar
and the included FreeMarker Manual to 2.3.11. - The project has switched from CVS to SVN. The CVS repository is not used anymore.
0.9.12
Date of release: 2007-04-27
Bug fixes:
- Warning! Incompatible change! In TDD files value types were incorrectly forced to string if they were inside an explicitly defined hash (i.e. inside
{
and}
). Like{x: 1, y: false}
was interpreted as{x: "1", y: "false"}
, that is, both values were strings. From now it is interpreted correctly, so with the above examplex
will be the number1
andy
will be the booleanfalse
.
New features, improvements:
- New data loader:
tddSequence
for loading a TDD file as a TDD sequence (i.e. list) rather than as a TDD hash (i.e. map). More... - Updated
freemarker.jar
to 2.3.10, andbhs.jar
(BeanShell) to 2.0b4 in the distribution pack.
0.9.11
Date of release: 2006-03-15
New features, improvements:
- New setting:
tagSyntax
. 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
freemarker.jar
to 2.3.6, andbhs.jar
(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.
- Warning! Incompatible change! When
sources
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 thesources
setting at all. - Warning! Incompatible Java API change! The
Settings
class was badly assumed that the whole source root directory has to be processed if thesources
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 thesources
setting was not set at all (it'snull
when you get it). So, if you want the whole source root directory to be processed, don't set thesources
setting at all. If it is already set, you can "unset" it withsettings.remove(Settings.NAME_SOURCES)
. - The Ant task didn't logged setting errors into the log file.
- The test suite now works with JDK 1.5, if you add
xpathSupport.lib
to thebuild.properties
.
0.9.10
Date of release: 2005-10-23
New features, improvements:
- The
pp.newWritableSequence
andpp.newWritableHash
methods now have an optional parameter, which is the sequence or hash whose items are added to the new writable sequence or hash. This makespp.copyWritable
deprecated, which was not able to create writable sequences/hashes based on non-writable ones. - New setting:
objectWrapper
. This let FreeMarker "experts" to create and fully configure thefreemarker.template.ObjectWrapper
object that FMPP will use. - Java API: a new
fmpp.Engine
constructor now let you specify thefreemarker.template.ObjectWrapper
to use. - FreeMarker 2.3.4 is included in the distribution. Note the new feature of FreeMarket that let you use
[#...]
,[@...]
, etc instead of<#...>
,<@...>
, etc if you start the template with[#ftl]
. <FMPP>/docs/examples/multipage_list
was updated to usesequence?chunk(pageSize)
, instead of complex BeanShell script that was needed before FreeMarker 2.3.3.- Manual improvements.
Bug fixes:
- On Windows,
fmpp.bat
has sometimes build theCLASSPATH
badly that ruined the command line call to java.exe and caused it to die with a strangeClassNotFoundError
. - 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.
- Warning! Incompatible Java API change! The FMPP engine has used and modified the shared
freemarker.template.ObjectWrapper.BEANS_WRAPPER
object, which is dangerous. From now by default it uses its ownObjectWrapper
instance. If you have utilized that it uses the sharedObjectWrapper.BEANS_WRAPPER
object (not recommended!), then for 100% backward compatibility you have to use theobjectWrapper
setting with this value:
"ow = ObjectWrapper.BEANS_WRAPPER; ow.setSimpleMapWrapper(true); return ow;"
(or if you don't use FMPP settings, do this in Java where you create the engine object:ObjectWrapper ow = ObjectWrapper.BEANS_WRAPPER; ow.setSimpleMapWrapper(true); Engine eng = new Engine(ObjectWrapper.BEANS_WRAPPER);
)
0.9.9
Date of release: 2005-04-12
New features, improvements:
- The csv data loader was improved:
- With the new
headers
option you can specify the header row for a CSV file that doesn't actually have a header row. - With the new
replaceHeaders
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.
- With the new
- New data loader:
slicedText
for loading a text file as a sequence of strings. More... - Java API: New class:
fmpp.dataloaders.AbstractTextDataLoader
, to ease the creation of custom text file data loaders for Java programmers. - Java API: New
StringUtil
methods:normalizeNewliens
,split
with trimming. - Warning! Incompatible change! The
+
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 "properties" format (that is, the extension of the FMPP configuration file iscfg
orproperties
), instead of this:
data={a:1, b:2} + properties(data/style.properties) + birds:csv(data/birds.csv)
your should write this:
data=a:1, b:2, tdd(data/style.tdd), birds:csv(data/birds.csv)
More information on hash addition...
Bug fixes:
- The
csv
data loader has incorrectly interpreted"\n\r"
as a single line-break. - Fixed some mistakes in the Manual and in the JavaDocs.
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:
urlEscapingCharset
- Java API: added static final fields to
Engine
for reserved engine parameter (setting) value strings:PARAMETER_VALUE_SOURCE
,PARAMETER_VALUE_HOST
,PARAMETER_VALUE_OUTPUT
. Also added the similar missing static fields to theSettings
class.
Bug fixes:
- The reserved
"host"
output encoding value was not resolved in some rare cases. - The the
pp.urlEnc
/pp.urlPathEnc
functions and thefmpp.util.StringUtil.urlEnc(...)
/urlPathEnc(...)
methods were malfunctioned with a few charsets, for example with UTF-16, UTF-7, and EBCDIC based charsets. - Warning! Incompatible Java API change! The documentation of
fmpp.ProgressListener.notifyProgressEvent(...)
forgot to mention regarding theevent
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.
- Warning! Incompatible Java API change! The
fmpp.util.NullWriter
andfmpp.util.NullOutputStream
classes has no public constructor anymore. Use their staticINSTANCE
field to get the singleton. - Fixed test-suite bugs: Windows vs UN*X vs Mac line-breaks, class-path problem in the
build.xml
.
0.9.7
Date of release: 2004-03-01
New features, improvements:
- New setting:
freemarkerLinks
. This is a dirty hack to satisfy a frequent demand:<#include ...>
/<#import ...>
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:
- Warning! Incompatible change! From now, native separators (as backslash under Windows) are not tolerated in the paths used in
<#import ...>
and<#include ...>
directives. You must use/
there. - Fixes in the Manual and in the the API JavaDocs.
0.9.6
Date of release: 2004-01-20
New features, improvements:
- New processing mode:
renderXml
. 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:
xmlRenderings
. More info... - New
pp
variable:pp.doc
. More info... - Java API: New class:
fmpp.XmlRenderingConfiguration
. Newfmpp.Engine.PMODE_...
constant:PMODE_RENDER_XML
. NewEngine
methods to add/clean XML rendering configurations.
- New setting:
- 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
build.xml
,qinstall
. It's the same asinstall
, but assumesy
for all questions. - Added figures to the Quick Tour chapter.
- Java API: Added a new utility method to
Engine
:static String getProgressListenerEventName(int event)
0.9.5
Date of release: 2004-01-14
New features, improvements:
- Java API: Improvements to the
Settings
class:- The API of this class is now as stable as other FMPP API-s, so it is not marked as experimental anymore.
- The
execute(Engine)
method is now deprecated, and will be soon removed. Useexecute()
instead. If you useSettings
, then don't createEngine
objects manually anymore, just use theSettings
object alone. See an example here... - Methods have been added to deal with progress listeners and engine attributes.
- Java API: some convenience methods has been added:
Settings.set(String, boolean)
,Settings.set(String, int)
,Settings.setDefault(String, boolean)
,Settings.setDefault(String, int)
,Engine.isXmlSupportAvailable()
,TddHashLocalDataLoader(String)
- More API documentation.
- More reliable and helpful
install
Ant target. - Terminology change: To prevent confusion, the settings of the
fmpp.Engine
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
@@markup
,@@nested_markup
,@@start_tag
, and@@attributes_markup
. This is mostly important for people who uses data of XHTML format for generating (X)HTML pages.
0.9.4
Date of release: 2004-01-03
New features, improvements:
- New setting:
localData
- Till now, all source files (all templates) have started with the same data model, the one you have specified with the
data
setting. With the newlocalData
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
templateData
setting is now deprecated. - Java API changes: New interface
fmpp.LocalDataBuilder
, deprecatesfmpp.TemplateDataModelBuilder
.
- Till now, all source files (all templates) have started with the same data model, the one you have specified with the
- The
borders
setting supports multiple layers. That is, multiple borders can be used at once for the same file. - In
<@pp.renameOutputFile ... />
you can use theextension
parameter instead ofname
, to change only the extension of the output file. - Java API:
TemplateEnvironment
has new methods, most importantlystatic TemplateEnvironment getCurrentInstance()
for accessing the current template environment in FreeMarker transforms/methods. - Java API: New methods to
Engine
:Object getData(name)
(returns unwrapped original values),Object removeData(name)
,cleatData()
(deprecates misnamedclearSharedVariables()
). - Java API: Engine attribute that implements
ProgressListener
get notifications about engine events. - Java API:
fmpp.tdd.FunctionCall
has public constructor now. - Warning! Incompatible Java API change!
Engine.getData(...)
doesn't throwTemplateModelException
anymore, because data wrapping is now deferred until the session execution. - Warning! Incompatible Java API change! Synchronization was removed from
Engine
. It did the same as if you synchronize on theEngine
instance and call the methods anyway... - Warning! Incompatible Java API change!
ProgressListener.notifyProgressEvent(...)
is now allowed to throwException
. - More API documentation.
Bug fixes:
<@pp.renameOutputFile ... />
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.
- Warning! Incompatible Java API change! Package
fmpp.listeners
were renamed tofmpp.progresslisteners
. - Warning! Incompatible Java API change!
Engine.removeAttribue
was renamed toEngine.removeAttribute
.
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 (Detailed information...):
- New settings:
xmlCatalogFiles
,xmlCatalogPrefer
. With these settings you can setup the OASIS catalogs that will be used for resolving entities in XML files. (See<FMPP>/docs/examples/xml_validating
) - New option to the xml data loader:
validate
. This specifies if the XML file will be checked for validity. - New setting:
validateXml
. This specifies if by default XML files will be checked for validity. - New setting:
xpathEngine
. With this setting you can set if you want to use Jaxen or Xalan for XPath-s.
- New settings:
Bug fixes:
- In FreeMarker 2.3: A bug that caused template processing to fail with
NullPointerException
on low memory conditions is now fixed. A bug in Jaxen XPath support that causedNullPointerException
-s has been fixed. Etc. - Warning! Incompatible Java API change!
Engine.process
doesn't throw sly uncheckedfmpp.IllegalConfigurationException
-s anymore. Also,fmpp.IllegalConfigurationException
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.
0.9.2
Date of release: 2003-11-12
Bug fixes:
- Warning! Incompatible change! 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
<#include ...>
and<#import ...>
were badly interpreted relatively to thesourceRoot
. 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<sourceRoot>/includes/foo.ftl
in a template file which is in not directly in thesourceRoot
like this:<#include "includes/foo.ftl">
. Now you should replace it with:<#include "/includes/foo.ftl">
. - Minor documentation fixes.
0.9.1
Date of release: 2003-11-09
New features, improvements:
- Warning! Incompatible change! Data loader
antProperty
andantProperties
now can convert the property values to numerical, boolean, or data/time/date-time variables. For example, to expose propertyx
as numerical variable, useantProperty(x?n)
instead ofantProperty(x)
. This causes backward compatibility problem only if you have Ant property names that ends with one of these:?n
,?b
,?d
,?t
,?dt
,?s
, and you have specified their name as parameter to these data loaders. In this case, append?s
at the end of the parameters. More info... - Data loader
csv
now supports columns of type date, time, and date-time. More info... - Later nightly build of FreeMarker 2.3 is included, that introduces new built-ins:
j_string
,js_string
. 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. Here...
- A few minor fixes in the documentation and in the examples.
Bug fixes:
- The
expert
setting worked inverted with the Ant task when it decided if you are allowed to use the project base directory asoutputRoot
. - The
install
target ofbuild.xml
didn't stopped nicely if theANT_HOME
was not set.
0.9.0
Date of release: 2003-10-30
New features, improvements:
- Warning! Incompatible change! 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
cfg
orproperties
are automatically interpreted as "Java properties" file, so the oldfmpp.cfg
-s will still work. But if your old configuration file doesn't use extensioncfg
orproperties
, then you have to rename it now. Also, note that the default file name for the new (TDD) configuration files isconfig.fmpp
, which has priority overfmpp.cfg
when both present in the same directory. More info... - 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
+
will be available for other purposes. To prepare for this future change, just replace+
characters with comma (,
) in your hash unions. See the chapter about the new TDD...- 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
#
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
true
.
- 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".
- Warning! Incompatible Java API change!
fmpp.tdd.TddParser
was gone, andfmpp.tdd.Interpreter
was introduced instead, which has different API.
- 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
- The FMPP Ant task now can load the settings from configuration files, with the new attribute
configuration
. 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<FMPP>/docs/examples/build.xml
and<FMPP>/docs/examples/ant3
to see applications. - New setting:
inheritConfiguration
. It is used for "customizing" an existing configuration by overriding some settings in it. See<FMPP>/docs/examples/inherit_cfg
. More info... - Warning! Incompatible change! Setting
sources
now uses TDD sequence syntax. Thus, you can't separate the files with:
or;
anymore, but with comma (,
). According to TDD syntax, quote file names that contain problematic characters, e.g.:
no/problem/with.it, "but quote this.txt",
C:\windows\path, r"C:\quote this win\path" - 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
.fmpprc
file placed into the user home directory or into the FMPP home directory. More info... - The
get
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:
data: {doc:xml(data/foo.xml), index:com.example.IndexBuilderDataLoader(get(doc))}
. More information... - Data loader
eval
has an optional 2nd parameter, the hash of variables that will be available when the BeansScript is evaluated. For example:
data: eval('...', {foo:properties(foo.properties), items:get(items)})
More info.... - With the new
appendLogFile
setting you can specify that the log file is continued, rather than restarted for each processing session. - Warning! Incompatible change! The
fmpp
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 astest.fmpp.keepme
, and then add the extra extension (keepme
in this case) to theremoveExtensions
setting. - The
quiet
setting now accepts valuestrue
,false
, andreallyQuiet
. Integer values are supported for backward compatibility only. - These settings were renamed:
removePostfix
toremovePostfixes
,removeExtension
toremoveExtensions
,replaceExtension
toreplaceExtensions
. This change is backward compatible, because the old names are internally translated. - New FMPP Ant task attribute:
antTaskFailOnError
. This tells if the FMPP Ant task should abort the Ant project with error if there were errors during the FMPP processing session. Engine.process(File src, File out)
now modifiesnull
sourceRoot
and/oroutputRoot
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,
Engine.getBuildInfo
. Also now the command-line tool prints it with--version
. - Improvements to the command-line help, such as new command-line option
--long-help
. - Warning! Incompatible Java API change!
Engine.process
doesn't throwIOException
anymore, onlyProcessingException
. - Warning! Incompatible Java API change! The built-in
DataLoader
implementations were moved into new packagetdd.dataloaders
. - Warning! Incompatible Java API change!
tdd.util.StringUtil.excToStr(Throwable)
was removed. - Revisited documentation and site generator.
- Now mode x is set for
bin/*
in the tar file. - Added test suite. (But more test cases should be added...)
Bug fixes:
fmpp.bat
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.
- Warning! Incompatible change! The FMPP Ant task didn't aborted the Ant project when
stopOnError="false"
, and the were skipped failed processing. Now it does. Note that the old behavior can be emulated usingantTaskFailOnError="false"
. pp.locale
didn't followed the locale changes made at template execution time with<#setting locale=...>
.- Various other little fixes here and there... But don't be sad. Many exciting new bugs has been added during the refactorings... ;)
0.8.12
Date of release: 2003-09-30
New features, improvements:
- Warning! Incompatible change! 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
<#include ...>
or user-defined directive tag with empty directive syntax as<@myMacro/>
(or its equivalents:<@myMacro></@myMacro>
and<@myMacro></@>
). 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. More information... - The return value of
freemarker.template.TemplateMethodModel.exec(...)
isObject
, notTemplateModel
.
- 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
- New
pp
variable:freemarkerVersion
. Also, newfmpp.Engine
method:fmpp.Engine.getFreeMarkerVersionNumber()
. Also, FreeMarker version number is printed together with FMPP version number everywhere. - Warning! Incompatible Java API change! API change:
fmpp.Engine.getVersionNumber()
does not throw checked exceptions anymore. - New
pp
directive:pp.restartOutputFile
. This directive empties the output file, but does not delete the file or discards the further output aspp.dropOutputFile
does. - Warning! Incompatible change! 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
.bak
and~*
filter mechanism was removed. Note that this all does not affect the FMPP Ant task. More information...
Bug fixes:
- With setting "borders", using headers with a template that contains
<#ftl ...>
resulted on illegal FreeMarker template, as nothing can precede theftl
directive. Now the header is intelligently moved after theftl
directive. - The documentation of
pp.set
andpp.add
was totally confused. - The engine was unable to return the FMPP version number sometimes due class loader issues.
- Warning! Incompatible change! Setting "ignore CVS files" had lower priority than the processing mode chooser list. Now it has higher priority.
- Warning! Incompatible change! Setting "ignore CVS files" didn't ignored
.#?*
files. Now it does.
0.8.11
Date of release: 2003-08-11
New features, improvements:
- Warning! Incompatible change! 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
foo.@bar
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${foo.@bar}
, but built-ins such as?exists
,?if_exists
or?default
don't work as before. For example, instead offoo.@bar?default('black')
, you now have to writefoo.@bar[0]?default('black')
. So if you have used existence built-ins with attributes, you have to find those occurrences in the templates and add that[0]
. - 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
xmlns
. - Special-keys
@@
and@*
now return a sequence of attribute nodes instead of the hash of them.
- Attribute queries such as
- The
xml
data loader has a new boolean option:namespaceAware
. If this is set tofalse
, 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.
0.8.10
Date of release: 2003-07-03
New features, improvements:
- Warning! Incompatible change! 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 list of uncompatible changes in the FreeMarker Manual!
antProperties
improved: You can give the names of Ant properties you want to expose, as parameters. So if you want to expose only propertiesfoo
andbar
, then just writeantProperties(foo, bar)
. More info...- New data loader
antProperty
, to expose the value of a single Ant property. More info... - New data loader
xml
, which uses the new XML wrapper of FreeMarker. It replaces the oldxmlInfoset
data loader, which is kept only for backward compatibility. More info... - Some code clean-up (as removing a few unused variables).
- From now,
freemarker.jar
will be checked in to the CVS repository.
Bug fixes:
- Warning! Incompatible Java API change! In
fmpp.util.FreemarkerUtil
,FtlVarToCoreJavaObject
is now renamed toftlVarToCoreJavaObject
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:
text
. This loads a plain text file into a string variable. - New pp variable to retrieve the FMPP Engine version number:
pp.version
- 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
build.properties
. - 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.
0.8.8
Date of release: 2003-04-29
New features, improvements:
- Rewritten
fmpp.bat
; it is now more flexible. - More documentation. No more "Under Construction" logo.
- New
pp
hash methods:outputFileLastModified
,sourceFileLastModified
,realFileLastModified
Bug fixes:
- Predefined data loader
now
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.
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
pp
variables:now
,sessionStart
. - Final version of FreeMarker 2.2.1 is included.
Bug fixes:
- The classpath in
fmpp.jar
didn't includedbsh.jar
.
0.8.6
Date of release: 2003-04-06
New features, improvements:
- New pp method:
pp.loadData(dataLoaderName, args...)
. This can be used to load data into a variable in templates, with the same data loaders as with the "data" setting. More information... - New
Engine
method:TemplateModel wrap(Object obj)
- Newer nightly build of FreeMarker is included (2.2.1).
Bug fixes:
- Warning! Incompatible Java API change!
DataLoader.load(engine, args)
now usesList
instead ofArrayList
for theargs
. - The
install
target ofbuild.xml
forgot to copybsh.jar
. - Minor fixes in the documentation.
0.8.5
Date of release: 2003-03-23
New features, improvements:
- New built-in data loader directive:
eval(JavaExpression)
Bug fixes:
- Fixes in the documentation.
0.8.4
Date of release: 2003-03-21
New features, improvements:
- More documentation. Especially in the documentation of the command-line tool.
- New setting: replace extension
- Warning! Incompatible change! If the option
remove-extension
orremove-postfix
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.
0.8.3
Date of release: 2003-03-16
New features, improvements:
bin/fmpp
andbin\fmpp.bat
now can load the FMPP realted jars from theANT_HOME
.- Added
install
target tobuild.xml
that copies the jars to theANT_HOME
. - More detailed installing instructions.
Bug fixes:
fmpp.FileUtil.compressPath
has died withIndexOutOfBounds
in rare cases.rar
was missing from the list of static file extensions.
0.8.2
Date of release: 2003-03-13
New features, improvements:
- Block assignments instead of
@capture
. For example, instead of<@capture local="foo">...</@capture>
you can write<#local foo>...</#local>
. - New pp methods to calculate relative paths:
pathTo
andsourcePathTo
. fmpp.FileUtil.getRelativePath
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:
fmpp.FileUtil.getRelativePath
has returned bad results in some rare situations.
0.8.1
Date of release: 2003-03-10
New features, improvements:
- Added "ignore CVS files" setting.
- Added
xml_infoset
example. - Simplified build process.
- Some minor fixes in the html-s and txt-s.
- Newer nightly build of FreeMarker 2.2 is included.
- Warning! Incompatible change!
?chop
was renamed to?chop_linebreak
(due the changes in the FreeMarker 2.2 CVS head) - Warning! Incompatible change! CVS files (
**/.cvsignore
and**/CVS/
) in the source directory will be ignored by default.
Bug fixes:
- The
Manifest.mf
infmpp.jar
was empty. - Last-generated date was incorrect on the HTML pages.
0.8.0
Date of release: 2003-03-05
The initial Sourceforge release.