I was playing with Java annotation processing. Application build fails in IntelliJ IDEA, while a maven build ends successfully. I am sure that provider class exists, yet I get the following error:
java: Bad service configuration file, or exception thrown while constructing Processor object: javax.annotation.processing.Processor: Provider <my class> not found.
I suppose that's because of a module X
, that should be compiled with -proc:none
argument. But I need annotation processing to be enabled for the rest of application. How to configure IntelliJ IDEA build proccess to skip a specific module during annotation proccessing?
You need to configure a separate annotation profile for your module.
default
profile.This answer is based on an article from IntelliJ IDEA Help.