JPS incremental annotation processing is disabled

Answered

IntelliJ IDEA version: 2022.1.4 (Ultimate Edition). Build #IU-221.6008.13, built on July 18, 2022. Runtime version: 11.0.15+10-b2043.56 amd64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.

OS version: Windows 10 Enterprise. Version 20H2. OS build: 19042.1826

Issue: I receive this message every time I build my maven project: "java: JPS incremental annotation processing is disabled. Compilation results on partial recompilation may be inaccurate. Use build process "jps.track.ap.dependencies" VM flag to enable/disable incremental annotation processing environment."

I researched online and here in this community. Here are the solutions I have found:

  1. Navigate to Build, Execution, Deployment > Compiler > Annotation Processors. Make sure "Enable annotation processing". I then navigate to the maven tool and click "Reload All Maven Projects".
  2. Add this VM option: "-Djps.track.ap.dependencies=false". Note: I also tried "=true". I have added this to several locations as earlier ones failed to have the desired effect: (A) Build, Execution, Deployment > Build Tools > Maven > Runner and placed in the "VM Options" edit box, (B) Build, Execution, Deployment > Compiler and placed in the "Shared build process VM options" edit box, and (C) Build, Execution, Deployment > Compile > Java Compiler and placed in the "Additional command line parameters" edit box. I then navigate to the maven tool and click "Reload All Maven Projects".

None of these seem to have any effect.

What magic setting have I missed?

2
3 comments

This warning is shown if parameter -Djps.track.ap.dependencies=false is set to false.

However, the default (and recommended value) is true. The flag exists there, because some annotation processors rely on javac's internal implementation (explicit casts or reflective calls to kavac internal classes) and won't work in the "incremental" annotation processing environment that IDEA provides.
Note that this is a VM option that should be specified in (or deleted from) File | Settings | Build, Execution, Deployment | Compiler | Shared / Local build process VM options field.

0

Adding this option to either setting in the Compiler options does not change anything, the warning remains.

1

Do you have the Lombok plugin enabled? Disabling it makes the message disappear for me.

Maybe this option is set by the plugin for Lombok annotation processing.

0

Please sign in to leave a comment.