Reputation: 70040
I would like to import the Groovy template engine in a standalone Java library. I got this idea after seeing that the Play Framework 1.2.4 also did it.
Is there a way to exclusively get the template engine without importing the whole Groovy framework?
Thanks
Upvotes: 2
Views: 1101
Reputation: 33486
One of the new features in the Groovy 2.0 release is modularization. There is a separate module for templating (everything in package groovy.text
) e.g. groovy-templates-2.0.0-rc-4.jar
. I am not quite sure what the dependencies of that module are so you might have to pull in some other Groovy modules. This will keep it to a minimum though. As 2.0 is not final yet you could probably try out a RC version.
Upvotes: 1
Reputation: 3769
Not to my knowledge, but you can run groovy code from a java class... see: http://groovy.codehaus.org/Embedding+Groovy
So you could get it to work with a bit of hacking.
Upvotes: 0