Hi boz, > Is there a way to generate Java code from a velocity template that > produces the same output as the template?
None that I know of... > I'm writing a report generator for TestNG. I have a template that makes > HTML but in the end I don't need to support lots of templates. In fact > i can get away with just one. On the other hand, TestNG is only about > 300k, so adding Velocity to the stack pretty much doubles the download. > What I want to do is create two reporters. One in just Java. The other > using Velocity, so folks can modify reports easily. What's another 300k in the age of the gigabytes? You can fit it in a floppy disk. :) #* Or, you can make it a maven plugin and use the central repository approach. http://maven.apache.org/using/repositories.html *# > It'd be great if I could make the report template in Velocity, then > generate a Java class from the template that produces the same output > as the template. Is there anything like that available? The best I can think of is to serialize the parsed template, but you still will need the engine to render it. ## Of course, I won't stop you from creating a velocity2java project. ;) Best regards, -- Shinobu -- Shinobu Kawai <[EMAIL PROTECTED]> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]