I was trying to build my project with gradle. I got this error:
"Detecting annotation processors on the compile classpath has been deprecated. Gradle 5.0 will ignore annotation processors on the compile classpath. The following annotation processors were detected on the compile classpath: 'org.apache.logging.log4j.core.config.plugins.processor.PluginProcessor'. Please add them to the annotation processor path instead. If you did not intend to use annotation processors, you can use the '-proc:none' compiler argument to ignore them."
I got that I have to use annotattionProcessor instead of compile. But how actually to do it. Here is the part of my gradle file dependencies:
dependencies {
implementation 'org.apache.logging.log4j:log4j-api:2.11.1'
implementation 'org.apache.logging.log4j:log4j-core:2.11.1'
}
I was trying to use it like this (implicit way), but it doesn't work
dependencies {
implementation 'org.apache.logging.log4j:log4j-api:2.11.1'
implementation 'org.apache.logging.log4j:log4j-core:2.11.1'
annotationProcessor 'org.apache.logging.log4j.core:config.plugins.processor.PluginProcessor'
}
Could anyone help me?
The answer was pretty simple:
dependencies {
implementation 'org.apache.logging.log4j:log4j-api:2.11.1'
annotationProcessor 'org.apache.logging.log4j:log4j-core:2.11.1'
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With