Closed
Labels
Description
Affected version
3.14.0
Bug description
On Maven master this is spit out by plugin before it goes for longest compilation time out of all modules:
[INFO] --- compiler:3.14.0:compile (default-compile) @ maven-support ---
[INFO] Recompiling the module because of changed dependency.
[INFO] Compiling 19 source files with javac [debug deprecation release 17] to target/classes
This is too much and wrong:
- I don't care why it recompiles (as info is repeated for each module), first line should be DEBUG
- second line is too much, and wrong: if it compiles only 19 source files (it does not), why it takes so long
- I am not interested where it compiles
- IMO plugin should emit one line like
Compiling source files with javac [debug deorecation release=17]
PS: maven-support module really has 19 source files, but a TON of generated sources as well (biggest in whole reactor).
Activity
[-]Compiler is too chatty, but on top says wrong things[/-][+]Compiler is too chatty, but on top it says wrong things[/+]desruisseaux commentedon Jun 1, 2025
The chatty part should be easy to resolve, but the part about the wrong count may be more problematic (unless we just remove that line) because the incremental compilation on the 3.x branch is known to have issues such as MCOMPILER-209. Since incremental compilation has been reworked in the 4.x version, do we still need to fix the incremental compilation of 3.x? Or do we just remove those lines on 3.x?
cstamas commentedon Jun 3, 2025
Yup, I'd have this plugin emit only one line:
Compiling source files with javac [debug deorecation release=17]zhaoyunxing92 commentedon Sep 5, 2025
I tried it (maven 4.0.0-rc-4) and it is indeed much faster. This problem that has been around for years should be solved. That's cool.
zhaoyunxing92 commentedon Sep 8, 2025
If you just modified the file adding method and did not involve import, you can use
-Dmaven.compiler.useIncrementalCompilation=false, which will make the second compilation faster (without clean). In short, we look forward to the next version, which improves this code.