Avoid re-generate Parser.jj on each build if the parser was not modified
I'm sure lots of us have seen during Maven build even though the sources
were not changed:
Compiling 1155 source files to .../code/calcite/core/target/classes
The issue there is FMPP generates Parser.jj no matter what, and it causes
JavaCC to re-generate parser which causes maven-compiler-plugin to compile
Note: Maven sends all the files to javac and it assumes javac is
intelligent enough to identify which files were modified and which need to
Unfortunately, regular javac is not incremental, and it basically builds
the whole source tree (see
I propose to use org.apache.drill.tools:drill-fmpp-maven-plugin instead of
Drill's fmpp plugin compares outputs, thus it skips overwrite of Parser.jj,
and it improves Calcite Core build times.
I'm sure IDEs would be happier since Parser.jj and the generated parser are
quite big and IDE won't have to re-parse it.
>From my point of view this is an improvement with no drawbacks.
Any thoughts? Objections?