chrisribble opened a new issue, #2144: URL: https://github.com/apache/logging-log4j2/issues/2144
## Description Commit https://github.com/apache/logging-log4j2/commit/8996e9fc07711e56645e2ef23597eaf87a0ffdef added `@SuppressFBWarnings` annotations to some constructors, but the corresponding Maven dependency was not configured. This results in compile warnings while building code that references these classes (`org.apache.logging.log4j.core.LoggerContext` in my application). In all of my projects, I switch warnings to errors and fail the build, so this makes log4j-core 2.22.0+ unusable. I suggest adding the appropriate Maven dependencies so that the annotations are added to the compile classpath in Maven/Gradle. Adding the following dependency in Gradle is sufficient to avoid the compile warnings, but needing to do this in each of my applications/subprojects is sub-optimal. `compileOnly 'com.github.spotbugs:spotbugs-annotations:4.8.3'` ## Configuration **Version:** 2.22.0 / 2.22.1 **Operating system:** Linux **JDK:** OpenJDK 64-Bit Server VM Temurin-17.0.8.1+1 ## Logs ``` $ gradlew clean assemble Configuration on demand is an incubating feature. > Task :compileJava FAILED /home/chris/.gradle/caches/modules-2/files-2.1/org.apache.logging.log4j/log4j-core/2.22.1/7183a25510a02ad00cc6a95d3b3d2a7d3c5a8dc4/log4j-core-2.22.1.jar(/org/apache/logging/log4j/core/LoggerContext.class): warning: Cannot find annotation method 'value()' in type 'SuppressFBWarnings': class file for edu.umd.cs.findbugs.annotations.SuppressFBWarnings not found /home/chris/.gradle/caches/modules-2/files-2.1/org.apache.logging.log4j/log4j-core/2.22.1/7183a25510a02ad00cc6a95d3b3d2a7d3c5a8dc4/log4j-core-2.22.1.jar(/org/apache/logging/log4j/core/LoggerContext.class): warning: Cannot find annotation method 'justification()' in type 'SuppressFBWarnings' error: warnings found and -Werror specified 1 error 2 warnings ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
