Since IntelliJ IDEA 2020.3.2 (I use Community Edition), I started getting:

Parsing java... [applicationname]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.Writing classes

warning, upon running the application within the IntelliJ IDEA.

This actually happens during the build phase, when you run your application for the "first" time (to be more precise, when target (or whatever you have configured as a building result directory) is being built).

What does this message mean?

11

Best Answer


As IDEA's build is incremental, it uses wrapper interfaces in order to collect some data that will help incremental analysis to correctly compile files affected by changes.

The -Djps.track.ap.dependencies=false option is added in:File > Settings/Preferences > Build, Execution, Deployment > Compiler.Then field Build process VM options disables collection of dependencies specified by an annotation processor when Filer methods are called.

In later versions of IntelliJ, the settings is now under:File > Settings > Build, Execution, Deployment > Compiler, then field Shared build process VM options

See some more details in this issue: IDEA-252069.

The jps incremental annotation processing is currently disabled. This feature, when enabled, allows for incremental compilation and processing of annotations in Java projects. However, there might be several reasons why it is disabled in your development environment.

One possible reason for its disablement is that it can introduce performance issues. Incremental annotation processing requires additional resources and can slow down the compilation process, especially in larger projects with numerous annotations.

Another reason could be compatibility issues with the current JDK version or build tools. Sometimes, enabling incremental annotation processing can lead to conflicts or errors due to incompatible dependencies or configurations.

Additionally, disabling this feature might be a deliberate choice made by the project team to ensure stability and consistency in the build process. By disabling it, developers can avoid potential bugs or unpredictable behavior that might arise from incremental processing.

It is essential to understand the implications of disabled jps incremental annotation processing in your project. Consider the impact on compilation time, build performance, and potential conflicts with other tools or dependencies. If necessary, consult the project documentation or reach out to the development team for further guidance.

I was using an older version of Lombok, changing to newer version fixed the issue in IntelliJ

Old version:

<dependency><groupId>org.projectlombok</groupId><artifactId>lombok</artifactId><optional>true</optional></dependency>

New version:

<dependency><groupId>org.projectlombok</groupId><artifactId>lombok</artifactId><version>1.18.20</version><scope>provided</scope></dependency>

In my case i was trying to use an old version lombok plugin (version 1.16.16), but it's an old plugin version, I updated to 1.18.20 (obs.: today is july 2021) and it works well.

I had to remove the target dir with rm -Rf ./target or mvn clean, then inside IntelliJIDEA's Maven panel, I clicked on the Icon "Reload all maven projects".I also tried to "Invalidate cache and restart".Not sure what was working but it solved my error.

I know the thread is almost 2 years old, but since this came up in search.

Fo me it worked after File->'Invalidate Caches...'

We can do all operations in IntelliJ IDEA.

  1. add -Djps.track.ap.dependencies=false in proper place.
  2. In the right of IDEA, click Maven -> Reload All Maven Projects.
  3. Also in the Maven -> Excute Maven Goal (represented by a 'm' icon) -> mvn clean -> enter
  4. Then Excute Maven Goal -> mvn install -> enter
  5. Build -> Rebuild Project.

Thank Andrey, djangofan and Falcon.

1.New version added in pom.xml

enter code here<dependency><groupId>org.projectlombok</groupId><artifactId>lombok</artifactId><version>1.18.20</version><scope>provided</scope></dependency>enter code here

2.mvn clean -> build project

In my case, In my case, upgrading the version of the Lombok package did not work.

 <dependency><groupId>org.projectlombok</groupId><artifactId>lombok</artifactId><version>1.18.26</version></dependency>

it still shows the same error.

Parsing java... [applicationname]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.Writing classes

The compiler in the idea perferences panel adds the -Djps.track.ap.dependencies=false parameter.

enter image description here

it didn't work again.

I suspect the cache problem or something, I use the invalid cache under the file and restart it several times, but it doesn’t work.

Finally, the build runner turns on the delegate ide build/run actions to maven, and that's it. However, after it is turned on, it will be very slow when I run the project debug locally, and then turn it off again. Lombok did not report an error, so it was solved.

enter image description here

In my case,the specific error is couldn't find one class file. I open it and find the suffix magically becomes '.aj'. Change it back to '.java'. It works for me.

This problem also comes when there is non compatible version of java installed on your system .

For my case i was working on debian Linux distro on Ubuntu 22.04 LTS but i installed ARM64 Compressed Archive

When i uninstalled above and installed x64 Compressed Archive

problem was solved .

In this case mvn --version did not worked either and was giving exec path error