In Maven builds I often see a pattern like the following:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
generatorPlugin is just a placeholder for different kinds of maven plugins which generate
code for example ANTLR4 Maven Plugin,
Templating Maven Plugin, JAXB2 Maven Plugin just
to mention a few examples here.
Usually this can be reduced to the following:
1 2 3 4 5 6 7 8 9 10
The reason is simple, cause those plugins already handle the task to add the generated source code to the correct parts in Maven to give for example the Maven Compiler Plugin a hint to compile also those generated java code.
Yes I know there are some of such plugins out there which do not do it in the
correct way which means you need to add the Build Helper Maven Plugin
snippet, but this means those plugins need some improvements. Those plugins
Convention over Configuration paradigm. Why? Simply cause you
as user need to think about an internal detail of those plugins which is simply
wrong. They have to handle that on their own.