On Monday, March 26, 2018 at 10:19:26 AM UTC+2, Rob Newton wrote:
I don't use Elemento, but AFAIU the problem lies in how annotation processors work and how Elemento uses them, and how the maven-compiler-plugin works (it would be the same with other build tools though).
Build tools don't expect that the result of compilation changes based on a resource file (because resources are meant to be bundled with the compiled classes, with side-effects at runtime rather than compile-time), and annotation processors can indicate which Java element triggered the generation of some file, and only Java elements, not resources. Consequently, the maven-compiler-plugin (rightfully) thinks it has nothing to do if Java source files haven't changed.
Annotation processors are not a good fit for this kind of work; non-Java templates should be processed by generators to generate Java source that will then be fed to the Java compiler (and possibly trigger annotation processing).
In the mean time, you'll have to "touch" the class responsible for the processing of the template to trigger a recompile.