This JIRA proposes the ability to inject custom POJOs into the Velocity template.
It is possible to override template directory configuration and thus make the compiler to generate customized code. However, customization possibilities are constrained to Velocity Template Language and objects injected into the template's context.
The ability of injecting custom objects into the template's context would leverage customization possibilities to the whole Java language itself. The patch I'm about to attach modifies both compiler and maven-plugin in order to provide client applications with the ability of easy injecting custom Java objects into the Velocity templates' context.