Skip to content

Compiler is too chatty, but on top it says wrong thingsΒ #333

Closed

Description

@cstamas

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

  1. changed the title [-]Compiler is too chatty, but on top says wrong things[/-] [+]Compiler is too chatty, but on top it says wrong things[/+] on Jun 1, 2025
  2. desruisseaux commented on Jun 1, 2025

    @desruisseaux
    Contributor

    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?

  3. cstamas commented on Jun 3, 2025

    @cstamas
    MemberAuthor

    Yup, I'd have this plugin emit only one line: Compiling source files with javac [debug deorecation release=17]

  4. zhaoyunxing92 commented on Sep 5, 2025

    @zhaoyunxing92

    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.

  5. zhaoyunxing92 commented on Sep 8, 2025

    @zhaoyunxing92

    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.

    mvn package -Dmaven.compiler.useIncrementalCompilation=false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.xbugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions