How would you structure Freemarker (or an alternative) as a templating code generator into a Maven project? I\'m pretty new to Maven and would appreciate some help.
I wa
I had written a maven plugin for this purpose. It uses the FreeMarker Pre Processor.
Heres the fragment from pom.xml highlighting its usage:
src/test/resources/freemarker/config.fmpp
target/test/generated-sources/fmpp/
src/test/resources/fmpp/
com.googlecode.fmpp-maven-plugin
fmpp-maven-plugin
1.0
generate-sources
generate
Here the cfgFile is the path where you keep the config file for FMPP. (if you are not using any special data passing in FreeMarker then an empty file will be enough) templateDirectory is where you keep the FreeMarker templates. outputDirectory is where you want the output files to be generated.
I am in process of writing a detailed documentation highlighting the plugins usage and will update the project website accordingly.