mraible wrote:
cfg.setDirectoryForTemplateLoading(new File("src/test/resources"));
As Milos already said, you usually don't want to use relative paths in a
Maven plugin. You expect relative paths to resolve against the project base
directory but this is not necessarily the current directory so you need to
make sure all paths are resolved as you intended. Compare [0].
However, I'd rather load the defaults from the plugin and allow overriding
in the project.
setClassForTemplateLoading(MyMojo.class) in combination with a proper (i.e.
absolute) path for setDirectoryForTemplateLoading() could do. If this
doesn't, writing your own TemplateLoader should do. [1]
Benjamin
[0] http://www.nabble.com/Common-Bugs-p14783703.html
[1]
http://freemarker.sourceforge.net/docs/api/freemarker/template/Configuration.html#setTemplateLoader(freemarker.cache.TemplateLoader)
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email