one template to several output files with fmpp

I want to set up an maven plugin that will take a few freemarker templates, and expand each one several times, each time with a different set of input values. Is there any better way to do this with fmpp that brute force processing them over and over?

Answers


When you say set up a maven plugin, do you mean write your own?

If you want to just use fmpp with Maven and avoid writing a plugin you could do this:

Use the maven-antrun-plugin and process your files with a small snippet of Ant script using the fmpp Ant task (fmpp.sourceforge.net/ant.html). Combined with the ant-contrib task (ant-contrib.sourceforge.net/tasks/tasks/index.html) you should be able to loop quite easily over a set of files.


Whether you use FMPP from a Maven plugin or not, the pp hash provides exactly what you need. Have a look at http://fmpp.sourceforge.net/pphash.html#key_changeOutputFile. You can call that function in a loop, producing a different output file for each iteration.


Need Your Help

How can I access the variable mapping used when bit-blasting?

z3 z3py

I'm modifying a tool which uses Z3 (specifically the Python API) to solve bitvector constraints. I need to use a particular external SAT solver instead of the internal Z3 one, so I'm first bit-blas...

c# application with mysql database

c# mysql database web-hosting

I'm developing C# application that interact with MySQL database hosted on free hostingwebsite: